8/31/2023 0 Comments Attiny84 serial port![]() ![]() For a permanent connection, you can power the TinySensor from the +3.3V on the Pi rather than the battery. Just ensure common ground and hook RX/TX on the Pi to whatever cross pins you chose on the TinySensor and you are in business. There is nothing fancy about connecting the TinySensor to the Raspberry Pi as the TinySensor runs on 3V, so no need for level shifting. My code with the TinySensor receiving RFM12b data and relaying to PI’s serial, but also listening for command and echoing them is here. The code below is for 9600 baud 8 MHz ATTiny84A CPU speed. Very basic setup, that's why I'm confused as to what's going wrong here. The rest of the connections are for the ISP programming (with the exception of PB7 being used for the LED). I have the patched NewSoftSerial library available on GitHub. I have ATTiny84A PB0 pin connected to the Arduino Uno Rx port. I have found a patch for the NewSoftSerial library that makes it compatible with the ATTiny84, so this will give me two-way communication between the Pi and the TinySensor and that opens a whole new door with possibilities, for example, the Pi can order the TinySensor to send out certain RFM12b message to other nodes. This is due to the limitation in the Serial implementation in the tiny core, only TX is implemented for debug purposes. Select the board and serial port that correspond to your Arduino board. ![]() the TinySensor sending data to the Raspberry Pi. My first version of this was one-way only i.e. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |