Thursday, 16 April 2015

Arduino UNO Adventure

Hello friends,
Priyasloka generously donated me an Arduino UNO. Though I have experience in other embedded board development, this is first time i am soiling my hand with Arduino.

This will be a series not a big chain of series. But few small parts. dealing with basics to some level of programming.

 Comparison of Arduino UNO with PIC microcontroller development board.

I have used PIC 18F4550 boards. Those board has one advantage, if a boot loader is burnt, then it is detected as a USB storage device and just copying the compiled code is sufficient. But to burn the bootloader, serial port (UART/USART) is needed. 
Arduino UNO has a serial to USB converter onboard. Which is better for beginner and dummies like me.( I hate External programmer and JTAG ) Geeeee

Getting started

I use Linux(Fedora) for casual use and also for my bread and butter.
so i decided to use my Fedora laptop for arduino adventure.

Arduino UNO has micro USB connector which is used for powering the board
as well as communicating with the board. Though UNO has a DC power supply connector.
We will get a micro USB cable which can connect to Arduino and laptop.
Mobile phone/smart phone charger cable might work for this purpose. (WARNING... I DON'T GUARANTEE IT)

We get a USB connector which connects to Arduino UNO and laptop. Bellow is the dump of messages linux throws.
Apr 16 11:36:13 localhost kernel: [ 1552.431146] usb 3-1: new full-speed USB device number 2 using uhci_hcd
Apr 16 11:36:13 localhost kernel: usb 3-1: new full-speed USB device number 2 using uhci_hcd
Apr 16 11:36:13 localhost kernel: [ 1552.583165] usb 3-1: New USB device found, idVendor=1a86, idProduct=7523
Apr 16 11:36:13 localhost kernel: [ 1552.583183] usb 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Apr 16 11:36:13 localhost kernel: [ 1552.583191] usb 3-1: Product: USB2.0-Serial
Apr 16 11:36:13 localhost kernel: usb 3-1: New USB device found, idVendor=1a86, idProduct=7523
Apr 16 11:36:13 localhost kernel: usb 3-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Apr 16 11:36:13 localhost kernel: usb 3-1: Product: USB2.0-Serial
Apr 16 11:36:14 localhost mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:1d.1/usb3/3-1"
Apr 16 11:36:14 localhost mtp-probe: bus: 3, device: 2 was not an MTP device
Apr 16 11:36:15 localhost kernel: [ 1554.157815] usbcore: registered new interface driver ch341
Apr 16 11:36:15 localhost kernel: [ 1554.157850] usbserial: USB Serial support registered for ch341-uart
Apr 16 11:36:15 localhost kernel: [ 1554.157880] ch341 3-1:1.0: ch341-uart converter detected
Apr 16 11:36:15 localhost kernel: usbcore: registered new interface driver ch341
Apr 16 11:36:15 localhost kernel: usbserial: USB Serial support registered for ch341-uart
Apr 16 11:36:15 localhost kernel: ch341 3-1:1.0: ch341-uart converter detected
Apr 16 11:36:15 localhost kernel: [ 1554.170609] usb 3-1: ch341-uart converter now attached to ttyUSB0
Apr 16 11:36:15 localhost kernel: usb 3-1: ch341-uart converter now attached to ttyUSB0
 The above messages shows us that the device(UNO) has ch341 UART converter chipset, and the virtual serial port assigned to ttyUSB0.
In Unix language it will be /dev/ttyUSB0. Your board may show different USB tty so dont panic. see the messages dumped by your system.
In the Next article I will explain about Arduino IDE instalation.

1 comment:

  1. Arduino is a very good platform to enter into digital domain for hobby. I have seen many windows based tutoroials but Linux & debian bases is first from my friends.

    ReplyDelete