I'll was expecting to have to upload a library... But not three libraries, I missed one of them and it caused me about two hours of strife... Learning moment I guess. Eventually my hard headed approach worked and I got an example sketch to run...I needed that as I was getting frustrated. I still want sure how I was going to do my project but I knew that it worked, even if I barely knew why.
I thought it might be a good start to use one of the sensors I got in my starter kit but never got around to using. I found a temperature/humidity sensor that, taking into account the changing weather might be interesting to get to know. I found through the model number on the back that this was a fairly common sensor that had well supported libraries. I choose to not see it up with the touch lcd screen yet as I thought it was best to tackle one new thing at a time. I set it up with a 16x2 lcd screen I had used in a prior project and copied some coffee into the sketch and fiddled with the program to have it display both Fahrenheit and Celsius. After I was more confident manipulating the sensor code I focused on the touch lcd.
I ended up taking a few lines of code from example sketch and using the sensor code from the small lcd sketch to, eventually, make it work. There was a few troubleshooting issues that I had to address: whatever is displayed stays displayed until you cover the whole screen in another color, I used black. This has the effect of resetting the display.
I ended up taking a few lines of code from example sketch and using the sensor code from the small lcd sketch to, eventually, make it work. There was a few troubleshooting issues that I had to address: whatever is displayed stays displayed until you cover the whole screen in another color, I used black. This has the effect of resetting the display.
When the sensor is powered on it takes about five seconds for the sensor to give reliable data so I put in a waiting screen in the code. It doesn't actually relate to the sensor's loading progress but it does allow the sensor to boot up and give an accurate first reading.
I was happy with how it was running so I experimented with some shape drawing, I can better describe this in the demonstration video. I know that there is a more efficient way of drawing Therese shapes but I wrote the coffee how I understood it and I had very few errors and bigs to troubleshoot! I learned some things!
No comments:
Post a Comment