Hi out there!
I've made a lot of progress lately and it is time to bring you up to date. I worked my way trough the tutorials of the sparkfun kit to understand the principles of arduino programming. By the way I soldered the relays on the board. It definitively would have been funny for a pro to watch me doing that, I've never done that before...
The next challenge was to get the DS18B20, the 1-wire temperature sensor, working. I don't really like it to use foreign code in my projects when I'm not 100% sure what it does, which is often the case when you implement huge libraries which are simply to huge to work trough and understand everything. So I've been pretty glad to find this link on the arduino.cc playground. A simple piece of good commented code and I was easily able to get temperatures on my arduinos serial monitor. It works amazingly good, by just holding the sensor between two fingers I see the temperature changing almost instantly. On the picture below, the sensor is the black thing with three pins on the left of the red LED, wired to pin 14, ground and supply voltage on the arduino. On the screen's left are some temperature readouts on the serial monitor and on it's right a bit of sheepdogs code. Thank you buddy, wherever you are!
That was already a good bunch of work done.
My next goal was to be able to switch on and off eight digital outputs, read their state and get the temperature trough serial data communication between my mac and the arduino. With that I'd be able to switch on and off the heating or the pump from within a program. This tutorial helped me a lot.
Although it is pretty easy to read and write data from and to the serial port, I had to see that my C was pretty rusty. But once I found a bit back to the syntax I was able to filter entered data and remote turn on and off ports. By typing 1on on the serial monitor the arduino now turns on a LED or a relay, 1off turns it off again and 1get sends my either an one or a 0 depending on the ports state. I then added sheepdogs code, after some minor changes to fit my needs and by typing temp on the serial monitor it now sends me back the temperature. I just had a little issue with the sensor sending me 85 degrees on the first request but I fixed that by adding a counter. In the picture below you can see my test setup with eight LEDs instead of the relays, the temperature sensor, some code on the screens background and the temperature and a state readout on the serial monitor.
Well, that seems like a big step forward direction beer for me! Next step will be to write a program to manage the brewing. I'll soon be back here and post about my progress, cya fellows!
No comments:
Post a Comment