logo FAB ACADEMY 2013

Home
Modules
About me
Links

Final Project
Week 0: Digital Fabrication Principles and Practices
Week 1: Collaborative Technical Development, Documentation and Project Management
Week 2: Computer Aided Design
Week 3: Computer Controlled Cutting
Week 4: Electronics Production
Week 5: 3D Scanning and Printing
Week 6: Electronics Design
Week 7: Moulding and Casting
Week 8: Embedded Programming
Week 9: Computer Controlled Machining
Week 10: Input Devices
Week 11: Composites
Week 12: Interface and Application Programming
Week 13: Output Devices
Week 14: Networking and Communications
Week 15: Mechanical Design and Machine Design
Week 16: Applications and Implications
Week 17: Invention, Intellectual Property and Income
Week 18: Project Development
Week 19: Final Project Presentation


Networking and Communication

The project for this week was to build a wired or wireless network with at least two nodes, similarly with the assignment last week my understanding of electronics is fairly minimal so I decided to use the asynchronous example shown within the class pages as a learning exercise.

I milled and stuffed the bus and the two nodes using the techniques developed in previous weeks.
Stuffed Nodes
Stuffed Bridge

Programming the network:
Once the boards were stuffed, the boards had to be programmed with sequential numbering to allow for effective communication between the bus and the nodes.  Before programming each board it was necessary to alter the line #define node_id '0' within the C Code to the corresponding number of the board within the network (i.e. bridge, ID = 0 & node 1, ID =1 , node 2 ID = 2 etc).  The board is then flashed by typing sudo make -f hello.bus.45.make program-usbtiny , I had a minor problem with the hello.bus.45.c as when I first tried to program the board I got the error message:

Thomas-Bells-MacBook-Pro:week14 thomasbell$ sudo make -f hello.bus.45.make program-usbtiny
avr-gcc -mmcu=attiny45 -Wall -Os -DF_CPU=8000000 -I./ -o hello.bus.45.out hello.bus.45.c
hello.bus.45.c: In function 'main':
hello.bus.45.c:220:22: error: variable 'message' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
make: *** [hello.bus.45.out] Error 1

To amend this issue I had to edit the hello.bus.45.c file by altering line 220 so it says:
const static char message[] PROGMEM = "node ";
 
This problem may well only be limited to OSX, the successful flashing of a board is shown below:
Programmed Bus

Communicating to the network:
Initially I started communicating with the network through Arduino by selecting the serial monitor option and ensuring the baud rate is set to 9600.  Once this is setup you can communicate through the serial monitor by simply by typing in the number of the corresponding node and hitting enter to flash the correct LED after all the LED have been lit.
Secondarily I use the Python script found here to communicate with my network by finding the relevant port by typing ls /dev/tty.usb* within terminal when the FTDI cable is connected to the network.  Then by typing

python term.py /dev/tty.usbserial-FT????? 9600

Network 2
Network 1

Serial Monitor







Designed by T&G
Back to the top