Open Source BASIC code for LED "Weather Clock"

Open Source BASIC code for LED "Weather Clock"

Postby Janke » Fri Apr 21, 2017 1:49 pm

Here's a first iteration of the code for the LED Matrix "Weather Clock" described in the previous topic -

I made a few changes after experimenting with the graphic display; it really made no sense without a scale, so instead, I added a second DHT22-type sensor (acually an AM2302) in order to display both inside and outside temperature and humidity simultaneously. A small arrow indicates internal vs. external measurements. The photo shows the new displays, without the confusing graphics. I also re-built the font a bit, in order to fit the complete word "Wednesday" into 40 pixels... :P

The barometric pressure is only measured inside (it's basically the same as outside), but there, I have an indication on whether it is falling, steady or rising. The sensitivity of that function is easily set with the deltaP variable; I've chosen a value of 0.5 millibar/hour to trigger a change in the "trend" display.

Please note: The code is in no way streamlined, and may still contain some bugs.

As described in my previous topics/posts, the hardware is really simple, just an EzSBC1, a bunch of MAX7219 modules, some 74ACT-type IC gates as level converters, and the sensors themselves, two DHT22/AM2302 and one BMP180. They are all connected in accordance with the instructions in their respective data sheets. Additional info can be found in the REM comments in the BASIC code.

Note that the sensors are powered by the 3.3 volt output on the EzSBC1 (current draw is minuscule), while the MAX7219 modules need 5 volts. Hence the 74ACT level converters, which are powered from 5 volts, but have 3.3 volt compatible inputs. Any non-inverting gates can be used, mine are OR gates with both inputs connected together. Using plain hex buffers, one IC would suffice, 3 gates for each row of MAX modules (clock, data and load/CS).

Total cost was around $ 50 - not bad for such a fun (and useful?) project! :lol:

Feedback appreciated!
Weather Clock.txt
ControlBASIC code
(15.87 KiB) Downloaded 16 times
Posts: 15
Joined: Mon Feb 20, 2017 11:48 am

Return to EzSBC1

Who is online

Users browsing this forum: No registered users and 1 guest