algorithmic modeling for Rhino
Hi. I am new with Grasshopper and firefly and my problem is with an Arduino MEGA 2560 with four sensors RHT03 (humidity and temp sensors). I can see the data from the serial monitor of Arduino (eight columns of numbers with humidity and temperature values), so it is fine. I set up with grasshopper and firefly to visualise the data: the ports are open and the from the mega read node I get the message "Now reading values from arduino board". But if I connect a panel to analogue pin I get a the number 170 without variation for all inputs. They does not show any data from the sensors. I tried with a generic reading node and in the panel I only see like this: 170 170 170 170 170 170 170 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 eol
What is it happening?
Tags:
The RHT03 (also known as DHT-22) is not a sensor which returns an analog value. Rather it has a one wire digital interface... which makes it more complicated to work with. I would recommend going through this tutorial to get an idea of how the sensor works (https://learn.adafruit.com/dht/overview).
Once you've gone through the tutorial and get the example code working... I would recommend setting it up so that you are printing your sensor values to the serial port. Simply concatenate your sensor values into a string (on one line possibly separated by a comma) and then use Serial.println() to send it over the serial port. Then, inside Grasshopper you can use the Generic Serial Write. This should allow you to get the sensor value into Grasshopper (and you may need to then parse up the string to get the individual values)... but it won't have the code necessary to send data back to the board from Grasshopper. I'm not sure if that is a requirement for your project... or if you only need to get the sensor value into GH to do some visualization. Anyway, hopefully that helps you get started.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by