This is a simple example using LEDs, which shows that communication is being done between the boards. The following video shows the boards making the communication. E lights a blue LED connected to pin 8 stating that it receives data from the Master card. In turn, the Slave or Reciever card flashes a yellow LED connected to pin 7 to show that it is alive. The Master card flashes a yellow LED connected to pin 7 to show that it is alive and sending data. Since attiny44 does not support the serial monitor, I could not figure out if the communication was being made, so I used leds for that purpose. I wrote the very simple program to see if the boards were communicating between them.Īttention, in the code it is necessary to set the same I2c adress for the two boards: Master and Slave (you can choose any adress, it does not matter) And hit upload button and you'll get a message at very bottom on arduino ide to plug the device within 60 sec then plug the device and if everything worked fine then you'll get a message micronucleus done thank you that means code. So I used the USI i2C library, which uses "#include USIWire.h" and the commands are identical to the common Wire library for arduino. ![]() The previous library only works for Slave and I could not find any library for the Master. In my searches I found a TinyWireS that works with attiny 44. The code had only been tested for ATtiny85 and might work with other attinys, so I relied on this code to try to reproduce for my attiny44.įirst you need to install and include TinyWire libraries. (There are workarounds, like the SoftwareSerial library or the. I've seen a very good example that explains the communication between atias 85, see here: Theres no hardware serial port or I2C port (Wire library), making communication trickier. ![]() ![]() I found some projects but none of the projects uses an attiny 44, which is very annoying. To start programming my board I started by investigating on the internet projects that use i2c communication between two attiny boards.
0 Comments
Leave a Reply. |