1st I set the LED designating the day GPIO.output(led21Pin, GPIO.HIGH) the other 3 pins are set low then I start the IF's if temp0 < 32: GPIO.output(led1Pin, GPIO.HIGH) GPIO.output(led2Pin, GPIO.LOW) etc I have 5 temperature if's I due this for the other six items, wait 30 seconds and then do the same for day 1 and day 3 and day5 after lets say 3 hours I want to go back and make an OWM call to update the data. I want to repeat the following process for let's say for 3 hours without any OWM calls. I am storing 7 items for each day times 4 unique days I am storing the return to a variable unique to the day for instance I set a=0 then temp = one_call.forecast_daily.temperature('fahrenheit').get('day', None) temp0 = temp then there are 6 more statements like that then I make the call for a = 1 which is tomorrow and then a=3 the n a = 5 NOW THE FUN. the values are stored, so that the unique daily info is displayed every so often (30 sec) but is only needed to be updated every 6 hoursīoy have a lot to learn and I appreciate your patience Basically I can reiterate the four different sequences and the lights light correctly and all that but I think I am making 28 calls.
or is there something else so that one call is made for the days. I am old school programming FORTRAN, COBOL, and BASIC and am having a hard time implementing what I would call sub-routines (these would be "DEF" functions?). I really don't need to update OWM more than let's say every 6 hours.
OK so far I can get multiple days but taking a lot of code and actually repeating code a lot to get the display(up to over 500 lines) also I am making OWM calls for each iteration over and over. What i want to do is have the display show multiple days such as current, tomorrow, day 3 and day 5 ( I would use the spare LED's to indicate which). each item has from 1 to 5 LED(different colored) indicators to indicate different conditions and combinations. I call 10 items temp, clouds, rain.humidity, wind, wind gust,precipitation, snow, status, and detailed status. Love this and got the basic working fine.
I used some screws that came with a case and screwed them directly into the board.īe kind in answering an old guy. We'll be removing it to do the soldering, but it's good at this point to know exactly where it will sit. If your LEDs don't fit completely snuggly you can use a bit of hot glue to keep them in place.Ĩ. For instance, I fitted them so that all of the positive legs (the longer ones) came out at the top. It may be useful to be consistent in how you position them to ensure that you get the polarity right when wiring everything together. Once it's completely dry, insert the LEDs into the drill holes. Applying it is simple - just brush it over lightly, let it dry, and repeat a couple more times.ħ.
(Optional) You can now apply some varnish to the board to give it a nicer finish. I used some blu tack to hold it in place and test the position before glueing it on.Ħ. Once you've crafted it use some wood glue to fit it into place at the bottom centre of the panel. I used my dremel to shape this, but again some sandpaper and patience should do the trick. Use some more scrap wood to create a kickstand. I did this with my Dremel, but I expect you could just use sandpaper with some patience.ĥ. You may also wish to curve the edges of the panel to give it a softer look. Once this is done, give everything a good sanding down. Make sure to test the holes by fitting the LEDs in and then removing them.Ĥ. Ideally the LEDs will be held in just using a tight fit, so start of by using a smaller drill bit and then enlarge the holes if necessary. Choose a drill bit that matches the diameter of your LEDs. Try to leave a good margin around the edge of the board to avoid the risk of the wooden splitting when you start drilling the holes.ģ. When this is done use a pencil to mark where the LEDs should be, making sure to leave room for the Raspberry Pi and kickstand. It's up to you how big it is, just make sure it's large enough to fit the number of LEDs you need and to mount the Pi.Ģ. I used the remnants of a chopping board that had split in half to create mine.ġ. The display board for this project is essentially a small wooden panel with a kickstand and holes drilled to fit 8 LEDs.