Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 16:02
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Arduino and Puppy Linux
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
JustGreg

Joined: 24 May 2005
Posts: 755
Location: Connecticut USA

PostPosted: Mon 15 Dec 2014, 20:21    Post subject:  Arduino and Puppy Linux
Subject description: Experience using the Arduino IDE
 

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
Back to top
View user's profile Send private message 
JustGreg

Joined: 24 May 2005
Posts: 755
Location: Connecticut USA

PostPosted: Thu 18 Dec 2014, 15:44    Post subject:
Subject description: A low cost Linux Console Computer
 

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0561s ][ Queries: 11 (0.0031s) ][ GZIP on ]