HowToMake(almost)
Anything

 

Networking

This weeks assignment is to make two processors talk to each other. I have done I2C on ATmega1281 before so I figured it should be doable on the ATtiny44. I decided to make a ligth cube passing lights between the sides, with one processor controlling every separate side respectively.

LightCube

First I designed the outside perimeter of the boards in soldiworks. (They fit a 9V battery in the center).

Next I designed the PCBs in eagle. I figured I would program the boards first, then disconnect the serial cable and hook up all the SCL-SDA wires for all the boards afterwards.

Then milling! It took forever, so I decided to just make two sides for now....
Next first step was to make I could properly control the LEDs, happily they worked. :) VIDEO

Next... trying to get the I2C working on an ATtiny44. -Not nearly as easy as on the ATmega128 which has an actual module to handle most of the low level code for you. On this processor you have to do bit banging to send and receive data. :/

Here's the code from my last project (robot based on ATmega128/master + ultrasound transceiver board based on ATmega168/slave). -There's a lot of extra code in there btw.

Other than the actual datasheet, here's a website I found helpful:

https://github.com/jrowberg/keyglove/tree/master/module_code/kgm_feedback

I think I have the code for the slave working (as in, I can send things to the board from an old controller I had lying around), however, I still haven't been able to get the master working on the ATtiny44.

Here the code for the slave...