Sunday, December 2, 2018

Sometimes you're HOT and sometimes you're Not!

This week we were given the choice to choose the project we wanted to do!!  Because I have never worked with coding for temperature sensors I chose circuit #7 in the Arduino book.  Wiring the board was not difficult but making sure I got the temperature sensor verses the transistor which look exactly alike was not easy for me.  Even with reading glasses I could not see the microscopic lettering.  I had to resort to a magnifying glass.  Below is a picture of the schematic I used and how my board looked when the set up was completed.








I went into the Arduino program and found the circuit 7 coding and typed it into a new page.  I checked the code through the program and it found several simple mistakes that I found and corrected.  When I uploaded the program it did not show that there was any voltage and the temperature did not change as it illustrated the voltage, and degrees in C and F.  After several attempts I decide to start over and re-wire the boards and turned the temperature sensor around as I thought maybe that was the problem.  The program stated it could not the port now and when I touched the sensor it was super hot, another Rooky mistake.  I unplugged the board from the computer turned the sensor back to the original position and plugged the board back into the computer.  I had the computer re-check the code and it uploaded the program again and just like that it finally WORKED!!!!!








As an extension I decided that output of the temperature was going so fast it was overloading my senses so I took out the print.screen(voltage) and the phrase the temperature in C is and the temperature in F is so it would be a little more user friendly, then I decided to add Have a Nice Day for good measure.  Still it went too fast so I changed the delay from one second to every 10 seconds.  Now you can easily see the temperature changes that was displayed every 10 seconds.

Below is a picture of the code changes and the program output with the changes in place.




No comments:

Post a Comment