The Arduino EEPROM library provides the read() and write() functions for accessing the EEPROM memory for storing and recalling values that will persist if the device is restarted or its operation interrupted. Unfortunately, these functions only allow accessing one byte at a time. The float, double (the same as float on most Arduinos), and long data types are all four bytes long, and the int data type is two bytes long, the same length as the word data type. Some trickery is needed to easily store and recall these values.
I ran into an interesting issue when trying to connect to a new printer with my Linux laptop. The printer firmware was set up for 250000 baud and for some reason I couldn’t connect to it. After a little searching, I found that this was a known issue in pyserial with newer kernels and there’s a quick fix.
When I first got started with Arduino under Linux, I quickly discovered that I had issues connecting to the Arduino to program it or talk to it via serial. I later found the same issue when I started working with 3D Printers, when trying to connect the host application to the printer to operate it.
This was clearly a permissions problem, as all of these cases (and other USB serial devices) worked just fine when run as root (not a good practice, don’t do this). This is just a quick post showing how to set yourself up with the permissions needed to use these devices as a normal user.