Arduino and Puppy Linux
Posted: Tue 16 Dec 2014, 00:21
I have been experimenting with the Arduino microprocessor boards and Puppy Linux. I am placing this post in the rogramming area because it has a lot of information on the Arduino boards rather than just Puppy Linux.
I have used three different Arduino boards, the Uno, Leonardo and Yun. The Arduino Integrated Development Environment (IDE) is available in two versions, the stable 1.0.8 and a beta 1.5.6 version. Both versions of the IDE need the Java Run Time Environment (RTE), which is available for most Puppy Linux Versions.
The stable version works with both the Uno and Leonardo boards. I have tested it with both Fatdog64 and Slacko 5.7.0. Both version of the IDE is available for either 32 bit or 64 architectures. Version 1.0.8 uses an USB connection to upload and burn a program (a sketch in Arduino speak). The USB connection protocol is the same as an USB modem (/dev/ttyACM0). In using the stable 1.0.8 version with both the Uno and Leonardo, I found a major difference between the two boards. The Uno uses a hardware UART for the serial communication over the USB connection. The Leonardo has a "virtual UART" created by software in processor. The problem area with Leonardo is if you are using the serial communication with your program, the running program (sketch) seizes the communication channel. The running program (sketch) uses of the USB communication channel will prevent you from uploading a new program (sketch) to the Leonardo. The solution is one has to hold the Leonardo board's reset switch for longer than 30 seconds. This will return to the board to initial factory configuration and allow you to install a new program(sketch). The Uno with its hardware UART does not have this problem. All the Arduino boards have multiple serial communication interfaces. One has to be careful in making sure the correct serial interface is used for the needed task.
To use the Yun board, one must use the beta 1.5.6 version of the IDE. Yun board not only has a USB programming port, but, also, network communication with both wired Ethernet and WIFI connectivity. The board has two processors, one for the Arduino programs (sketches) and the other has embedded Linux OpenWRT) for network communications with web server. It was the console based embedded Linux that caught my attention. The embedded Linux also has Python 2.7 available.
The IDE 1.5.6 version is a beta product with a few "oh by the ways". For the IDE to find the Yun board on the network, the operating system needs to have "bonjour" or Avahi services to locate the board. Also, 32 bit architecture works fine with Slacko 5.7.0 and USB connection. The lack of avahi services in Slacko makes connecting via network, a bit trying. The 64 bit version of the IDE 1.5.6 will compile a program(sketch) but, both the network and USB connections failed with errors. There is a missing libraries error. The IDE program avrdude.bin requires libncurses.so.5, and libtinfo.so.5 These are 32 bit libraries also as technosaurus pointed out. The funny thing is the 32 bit version of avrdude.bin does not use these two libraries.
I have found a way to work around the Yun wifi communications problem. It is not the best solution, but, it does work. In the IDE, one only complies the sketch using the "Verify" button. One then can find the output hex file (sketch-name.cpp.hex) in the /tmp/build# directory.
You copy the hex file to a permanent directory, my suggestion /root/ardunio/hex_files. You will have to create the directory hex_files, since it is not a normal arduino directory.
Once you have the file, one can open a browser using the Yun IP address, and connect to the Yun webserver. On the first page, at the bottom of page, there is a section to upload a hex file. Use the browse button to find the desired file and select it. Click on the upload file and it will be installed.
There is another "Oh by the way". More than likely, the Yun board you recieved will not have the latest Linux firmware. After configuring the Yun for the wifi network (directions here:http://arduino.cc/en/Guide/ArduinoYun). You need to download the latest version of OpenWRT (directions here:http://arduino.cc/en/Tutorial/YunSysupgrade). Once you have done the upgrade then you can start using the Yun board.
The bottom line from my experience with Arduino, if you are new to using Arduino, then start with a good starter kit that has the Uno board. The Uno is the easiest to start using and learning with versions of Puppy Linux I use. Once I get more knowledgeable with the Arduino version of C++ language, then I will start using the Yun more.
The Yun board's OpenwRT Linux, if you are knowledgeable about networking and Python then offers the chance to do some very intersting things with the "Internet of Things".
I hope this helps someone.
I have used three different Arduino boards, the Uno, Leonardo and Yun. The Arduino Integrated Development Environment (IDE) is available in two versions, the stable 1.0.8 and a beta 1.5.6 version. Both versions of the IDE need the Java Run Time Environment (RTE), which is available for most Puppy Linux Versions.
The stable version works with both the Uno and Leonardo boards. I have tested it with both Fatdog64 and Slacko 5.7.0. Both version of the IDE is available for either 32 bit or 64 architectures. Version 1.0.8 uses an USB connection to upload and burn a program (a sketch in Arduino speak). The USB connection protocol is the same as an USB modem (/dev/ttyACM0). In using the stable 1.0.8 version with both the Uno and Leonardo, I found a major difference between the two boards. The Uno uses a hardware UART for the serial communication over the USB connection. The Leonardo has a "virtual UART" created by software in processor. The problem area with Leonardo is if you are using the serial communication with your program, the running program (sketch) seizes the communication channel. The running program (sketch) uses of the USB communication channel will prevent you from uploading a new program (sketch) to the Leonardo. The solution is one has to hold the Leonardo board's reset switch for longer than 30 seconds. This will return to the board to initial factory configuration and allow you to install a new program(sketch). The Uno with its hardware UART does not have this problem. All the Arduino boards have multiple serial communication interfaces. One has to be careful in making sure the correct serial interface is used for the needed task.
To use the Yun board, one must use the beta 1.5.6 version of the IDE. Yun board not only has a USB programming port, but, also, network communication with both wired Ethernet and WIFI connectivity. The board has two processors, one for the Arduino programs (sketches) and the other has embedded Linux OpenWRT) for network communications with web server. It was the console based embedded Linux that caught my attention. The embedded Linux also has Python 2.7 available.
The IDE 1.5.6 version is a beta product with a few "oh by the ways". For the IDE to find the Yun board on the network, the operating system needs to have "bonjour" or Avahi services to locate the board. Also, 32 bit architecture works fine with Slacko 5.7.0 and USB connection. The lack of avahi services in Slacko makes connecting via network, a bit trying. The 64 bit version of the IDE 1.5.6 will compile a program(sketch) but, both the network and USB connections failed with errors. There is a missing libraries error. The IDE program avrdude.bin requires libncurses.so.5, and libtinfo.so.5 These are 32 bit libraries also as technosaurus pointed out. The funny thing is the 32 bit version of avrdude.bin does not use these two libraries.
I have found a way to work around the Yun wifi communications problem. It is not the best solution, but, it does work. In the IDE, one only complies the sketch using the "Verify" button. One then can find the output hex file (sketch-name.cpp.hex) in the /tmp/build# directory.
You copy the hex file to a permanent directory, my suggestion /root/ardunio/hex_files. You will have to create the directory hex_files, since it is not a normal arduino directory.
Once you have the file, one can open a browser using the Yun IP address, and connect to the Yun webserver. On the first page, at the bottom of page, there is a section to upload a hex file. Use the browse button to find the desired file and select it. Click on the upload file and it will be installed.
There is another "Oh by the way". More than likely, the Yun board you recieved will not have the latest Linux firmware. After configuring the Yun for the wifi network (directions here:http://arduino.cc/en/Guide/ArduinoYun). You need to download the latest version of OpenWRT (directions here:http://arduino.cc/en/Tutorial/YunSysupgrade). Once you have done the upgrade then you can start using the Yun board.
The bottom line from my experience with Arduino, if you are new to using Arduino, then start with a good starter kit that has the Uno board. The Uno is the easiest to start using and learning with versions of Puppy Linux I use. Once I get more knowledgeable with the Arduino version of C++ language, then I will start using the Yun more.
The Yun board's OpenwRT Linux, if you are knowledgeable about networking and Python then offers the chance to do some very intersting things with the "Internet of Things".
I hope this helps someone.