Grasshopper

algorithmic modeling for Rhino

DHT11 Digital Sensor serial read problem

Hi All I am trying to read the humidity and temperature from DHT11 learn.adafruit.com/…/using-a-dhtxx-sensor sensor into grasshopper via firefly. so far no luck, here is what I have tried so far.

I have seen sever similar posts with no responses.  So here is hoping for the best.

1- Running the DHT11 in the Arduino IDE Serial monitor works great!

2- Loading the firmata and connecting the board to firefly seems to be connected, analog sensors giving readings.

3- Taking the DHT11 sketch adding the firmata library on top and uploading. This is the point where things seem to stop working. The Arduino code uploads ok, but now the analog sensors stop working and the digital sensor also is not giving any info.

I read that because the digital sensor is I2C so I should use the firefly serial read, but no luck it just gives a fixed set of numbers that do not reflect the analog or digital sensor. How do I modify the firefly firmata to include the DHT11 library or modify the DHtT11 code to include and actually work with firefly?

Or is there a different better way to engage with this type of problem.

Thoughts advice help all appreciated!

Views: 1010

Replies to This Discussion

Ok. so maybe this was a dumb question.  I now understand that can just use the firefly serial read to read the DHT11  serial write.  BUT the crux of my question remains.  There are a lot of digital sensors out there that require there own library ect, and IF i want to be using firefly to both read one (or several of these) and also use firefly to read/write the analog pins and servos, what is my best way to do this?  all im looking for is some advice on the best way to approach this and some direction to useful resources.  Is there a way to do this on the grasshopper end perhaps? (like make a button)

so here is my bad work around. still would really like to make a better way to do this and welcome any advice or points in the right direction.

got it working with serial read

using a tweeked version of the ladyada DHT tester

It comes out as text, see the attached for my less than perfect work around.  but conceivably you could do as many digital or analog sensors this way.  the disadvantage is no way to write(? or can you?) there should be a better way to do this???

what is in that cluster

I feel like i am re-inventing the wheal out of mud and sticks.

Thoughts?

Attachments:

Hello.

Did you find any other working alternatives for this issue,

or just gave up?

Just now I bought a series of sensors and was already imagining what to do with them, but most of them are not analogic

More, I was trying to load your file to Arduino, but erros occur in compling.

Maybe some arduino update changed functions?

Thanks for your help

nelson brito

yes i got a better works around.  i will post today or tomorrow.  sorry it seemed like on one was interested.

I see what you mean, but sometimes is just a question of (bad) timing: I´ve been wanting to do this for a long time, but there is always something coming up.

To minimize that, there is always the advantage of working in group: just recently I invited a student to help me solve some stuff and them to write some papers.

I´m finishing a Ph.D. on "Upgrade Opportunities for Ancient Buildings (in Historic Centers) and although this is not my core, I really think Arduino and Firefly can  change the way we deal with residential buildings.

So, all help and contributions welcomed, and I will be looking forward (and citing) your contributions. Thanks in advance

Hi sorry it took me a little longer to get back to you.

It is the last week of classes and things are getting a little hectic.

the final work around was to use the set up shown above with the firefly serial monitor but with the text split set to a , rather than  as space

what this means is you have to mostly do the work in arduino and the grasshopper/firefly is just a way to turn your sensor readings into drawings.

so your ardunio code should serialprintln a single line with the numeric value from each sensor separated by a comma.

then text split in grasshoper will break the each line from the firefly serial monitor in to a set  and you can use cull and sort from there to use the sensor readings.

I thought i had a example code and grasshoper file but I can find them right now.  let me know if you have questions and ill try and find the example.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service