![]() ![]() On the Uno master the main loop is a bunch of requests from the slaves. In the serial monitor I'm given values with 4 decimal places. Wire.write(table, 8) //send 8 bytes to the masterĪs far as I can tell by using the serial monitor to debug, the slave is doing exactly what I want. With the interrupt for an I2C request from the master: digitalWrite(txLED, HIGH) įor(int i=0 i<4 i++) //move to the next array entry after 4 bytes Serial.println(table) // debug print to serial monitor Serial.println(sensor.readTemperature(), 2) This is most of my main loop: Serial.print("Humidity: ") ![]() On the Nano I'm reading the sensor data and putting it into an array (table). The concept is that a sensor will be in a location removed from the master and eventually it's going to change from I2C connections to wireless ZigBee, however I still have to send the sensor data to the ZigBee chip via I2C. What I'm trying to do is use an Arduino Nano as a slave sender, reading temperature and humidity with 4 decimal places (xx.xx✬ and xx.xx%), to send to an Uno as a master receiver. I'm a novice, but I have a basic understanding of concepts. As the title implies, I'm having some difficulty sending a float array over I2C. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |