LoadError: LoadError: UndefVarError: ASCIIString not defined

The reply on the post you link to is probably the best answer:

I encourage yo to try and work without ASCIISTRING. For example, as proposed in the answer, you could just use String and check if the string is ascii inside the function

function pinMode(file_des::SerialPorts.SerialPort , pin_no::Int64 , mode::String)
!isascii(mode) && throw("Mode needs to be ascii") #This will throw an error if mode is not ascii
  m = uppercase(mode)                                             # Prevent errors due to case differences
  if m == "INPUT"  str = "Da"*string(Char(48+pin_no))*"0"  end    # Dan0 for INPUT
  if m == "OUTPUT"  str = "Da"*string(Char(48+pin_no))*"1"  end   # Dan1 for OUTPUT
  str = ascii(str)                                                # Converts UTF8String to ASCIIString
  write(file_des,str)
end

If your code is composed of more functions, probably updating first to v0.5, then to v0.6 and v0.7. In particular v0.7 will tell you a lot of deprecation warnings to help you get your code ready for Julia v1.6

2 Likes