Arduino and Puppy Linux

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

Arduino and Puppy Linux

#1 Post by JustGreg »

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.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#2 Post by JustGreg »

In researching the Arduino Yun, I found an interesting shield called the Dragino Yun Shield. It was a shield when added to an Arduino board would add the Yun capabilities. With a price of 30 US dollars, I decide to take the risk and order one.

As usual, I quickly found out after receiving it, there were differences between the Yun shield with an Arduino board and the normal Arduino Yun. The first is one would lose the USB programming connection with the Uno board. The second difference was the Yun Shield did not have micro-SD holder. The Yun Shield does have a single USB host port and one could add a flash drive there. But, you lose the USB host port. The third was the Yun Shield requires an external wifi antenna (supplied). The normal Yun has self-contained wifi antenna. The compromises with the Yun Shield and Arduino board make the lower cost combination not worth it.

But, the good news was the Yun Shield had the full OpenWRT Linux with network connectivity for both ETHERNET and WIFI. The OpenWRT Linux from Dragion is different from that of Arduino Yun. For example, the Dragino only has vi as a console editor. The Arduino has both nano and vi. The Yun Shield has all of the web server components and standard busybox utilities.

After looking at the Yun Shield specifications and pin connections, I realized if one applied 7 to 12 volts to the Vin power pin and GND pin, then the board should work. I tried it and does work properly. With power applied to the board, one has a console based Linux with network connectivity and web utilities.

I have done some experiments with the Yun Shield in console mode (ssh). It is a little like going back in time to console period of computing. It is a good way of learning about the command line and the ASH scripting language.

The Arduion Yun has a way of transferring the OpenWRT files and directories to the micro-SD card for more storage. The normal storage on the card is only 64 Megabytes with 512 Megabytes of processor memory. With a mirco-SD card, one now has Gigabytes of storage depending on the size of the card. I have reviewed the sketch that does this. I think it can be done manually to a flash drive with a Linux computer. If there is any interest, I am willing to try it out.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Percy Shoebox
Posts: 1
Joined: Tue 24 Mar 2015, 04:40

#3 Post by Percy Shoebox »

Thank you for posting this. This is exactly the kind of empirical knowledge that "gets lost" as time moves people on to newer hardware/platforms and unfortunately forgotten. Some of us love our old stuff and archive info like this "just in case". And guess what? I needed it.

Thanks again.
Percy

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#4 Post by JustGreg »

Your are welcome. Additionally, Arduino IDE version 1.6.0 is out. It does work with Puppy. I have solved the library issue. For Fatdog64 version 700, there is a package (.txz) for the IDE version 1.6.0 in its repository,
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#5 Post by 8-bit »

I have read articles on use of those boards in the building of expansion hardware for old computers.
An example would be a hard drive interface for an old computer that was never made to have a hard drive.
Also, a USB connected chip programmer it seems was a project.

So can you give us an idea of what you are making?

Very useful information on the different types.

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#6 Post by JustGreg »

@8-bit,
I help a charity that is called "Ears to Our World". Ears to Our World distributes solar/hand cranked power radio to underdeveloped areas for educational uses. The short wave band is used for many of education programs. The problem is the old analog IC devices are no longer available for this type of radio. Some of the new digital designs required more power and reduced the battery life. If one is hand cranking the generator to charge the batteries, then this is not a good thing. Additionally, the short wave band coverage is an after thought and the short wave performance is poor.

I am trying to make a prototype design that will give better performance. I have done a concept demonstration based the Silicon Labs SI4703 chip with an Ardunio Uno processor. I have been using Fatdog64 for the Arduino IDE to develop the control software. The Si4703 is covers the FM band only. I am working on getting a Si4734 chip, which has medium wave, short wave and FM band coverage.

The chips are 3.3 volt devices combine with 3.3 volt microprocessor running at a low clock speed and Li Ion battery should result in reasonable performance. This project is a the beginning stage.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Post Reply