Forum › Coding Corner › Device Sketches
- This topic has 11 replies, 5 voices, and was last updated 2 years, 3 months ago by Martyn.
-
AuthorPosts
-
-
December 6, 2021 at 10:26 pm #6631Martyn
Here are some working sketches that make functional devices. Please feel free to post your own in this thread. I’ll add them to this list if they are easy to read and well commented.
Digital Clock
Boards: MOTHERBOARD, DIGITISER
Function: Display the time, date, and year on the digitiser. Uses one of the buttons on the digitiser to select time, date or year. Uses the potentiometer to adjust brightness.Clock and Sensor Display
Boards: MOTHERBOARD, DIGITISER, SENSOR ARRAY
Function: Display the time, temperature and relative humidity on the digitiser. Uses one of the buttons on the digitiser to toggle between them. Uses the potentiometer to adjust brightness.DOWNLOAD (Link coming soon)
RGB Sensor Bar Display
Boards: MOTHERBOARD, RGB MATRIX, SENSOR ARRAY
Function: Display the relative light levels, humidity, temperature and sound levels on the RGB Matrix as bars.DOWNLOAD (comments not finished)
Sensor Data Logger
Boards: MOTHERBOARD, SENSOR ARRAY
Function: Saves the temperature, relative humidity and time every 5 mins in a text file on a micro SD card.RGB Alarm
Boards: MOTHERBOARD, RGB MATRIX
Function: Flashes the RGM Matrix at a set time. Can be used as a reminder light. Add a new if statement for each alarm. Change the colour or pattern by changing the bits when shifting out.- This topic was modified 2 years, 11 months ago by Martyn.
- This topic was modified 2 years, 11 months ago by Martyn.
- This topic was modified 2 years, 10 months ago by Martyn.
-
January 5, 2022 at 8:53 pm #6675schole28
Hi Martin
The Sketch of DigiClock has a little bug inside:
[…]
//RTC Stuff
rtc.begin();
//rtc.adjust(DateTime(__DATE__,__TIME__));; // Set the RTC to Compile Date and Time
//DIGITISER Stuff
pinMode(SER, OUTPUT); // SER (data) pin as output
[…]
The two // before rtc.adjust should be removed.
Regards
Jean-Luc
-
January 6, 2022 at 11:08 pm #6695Martyn
Hi, thanks for the input. With that line of code, we want to uncomment it to set the time, then put the comments back and re-upload the code. If you leave it uncommented, every time you restart the device, the time will reset to the time you uploaded it. I should have written that in the comment to explain, sorry. I’ll make the changes and update the link.
EDIT: I have updated the link. I have also changed the pin numbers to match the diagrams in the manuals
- This reply was modified 2 years, 10 months ago by Martyn.
-
-
January 10, 2022 at 11:33 pm #6721udenk
EDIT: I have updated the link. I have also changed the pin numbers to match the diagrams in the manuals
not sure what you updated, but the link here still has the commented line.
-
January 11, 2022 at 8:28 pm #6724udenk
ok, it pays to read the comment in line 94.
- This reply was modified 2 years, 10 months ago by udenk.
-
-
January 10, 2022 at 11:51 pm #6722udenk
fwiw date is in DD/MM
-
January 17, 2022 at 4:03 pm #6745dplass
What’s the license/copyright on the sketches in the manuals? I’d like to publish my own versions (with enhancements) and share them with the community via GitHub.
-
February 8, 2022 at 7:07 pm #6823Martyn
Totally open source. I would love to see any modifications and enhancements you can come up with! I designed these kits as a starting point, hoping the community would make them their own. So, thanks for sharing!
-
February 8, 2022 at 7:37 pm #6825dplass
Here ya go:
https://github.com/dplassgit/short_circuits
Most significantly, I reverse-engineered how to control the RGB matrix. There is other sample code in the repo as well. It’s under an MIT license, so anyone can do pretty much anything they want with it.
-
February 14, 2022 at 8:18 pm #6850Martyn
Thanks! I’d love to see this as scrolling text! I also wonder how the 8×8 single colour matrix I’m making will fare with this kind of text…
It looks like you have a fair amount of coding experience. Do you fancy reverse engineering this to get it working with the RGB Matrix board? I designed my board before seeing this guys code, so it doesn’t work out of the box. The guy who wrote it said I could adapt it, but I just don’t have the coding skill. No worries if not, just thought I’d ask 🙂
Thanks again for sharing your code!
-
-
-
-
July 31, 2022 at 8:37 am #8002pjhi9man
Hi Martin, I’ve been playing with the digitizer board for a little while now – all good – I gather sw2 and the LED4 (RED) are for us to program as your sketch doesn’t utilize these!
Keep up the good work – I’m enjoying learning how to put the boards together and code
-
August 1, 2022 at 11:35 pm #8008Martyn
Absolutely! You can program the device in whatever way you see fit! The example code is just there to show you how it all works.
Happy coding!
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.