Since I spent most of the Fab Academy programming in Arduino IDE, I wanted to try Neil's C code so I chose to do the Hello Serial Bus C example.The purpose of the assignment is to learn how to connect [or network] several boards in a serial bus. I used the 2 nodes and the bridges as mentioned in the tutorial.
1 Attiny45
1 6 pin header for programming
1 4 pin header for TX and RX (to power it)
1 10k resistor
1 LED
1 1uf capacitor
and the birdge also need 6 pins for the FTDI
Arduino IDE
For programming in C the Hello Serial Bus, I needed to use UBUNTU. I work iwith PC, so at the begining of the course I had to install ubuntu in my computer. The only way i could do it was using a Virtual Manager but it has been working ok.
First, I downloaded the .png file for milling 2 nodes and 1 bridge . The only difference between the nodes and the bridge is that the bridge has 6 extra pins for connecting the FTDI cable. It is the node that will power the rest.
I feel like soldering is getting easier for me. I added all the components to the 3 boards and checked the connections with the multimeter. Everything look good.Now it's time to program the 3 boards. I connected the bridge to the FTDI and to the computer to program it. To beign programming, you need to modify the .c file to reference it to each one of the node. You need to do this for each node.
:
#define node_id ’0′
#define node_id ’0′ (node 0 or the bridge):
#define node_id ’1′ (first node)
#define node_id ’2′ (second node)
I tried to program the boards step by step. Everytime time I tried, I got the this error: Error: Could not find USBtine device (0x1781x0xC9f) . Although I downloaded Neil's code from this tutorial, I couldn't make it work with Ubuntu.
Then, one of my classmates found out that there is an error in line 220 of Neil's Code and there should be static const . I fixed this and tried again but it didn't work.
After reading in the internet and consulting my classmates, I figure it out that there is an error with Ubuntu and some PCs that would not install the firmware properly, so the usbtiny will never be recognized. Therefore, I tried with Leo's computer (that it's a mac) and I did it! I flashed the 3 boards and made them work almost good. One of the nodes doesn't flash everytime. I tried to fixed it but I couldn't find the problem.