26
3
Need help making a timer (programming.dev)

Hello!

For a project I need to make a four-digit timer that counts up. I think I can figure out the counting part myself, it is just the display part I need help with.

We are using four separate seven segment displays and an Arduino Mega 2560. The code currently looks like this: (I had it written over multiple lines, but the Lemmy preview just makes one big block of text from it so sorry for that)

void Display1() // Display a 1 { digitalWrite(1, LOW); digitalWrite(2, LOW); digitalWrite(4, HIGH); digitalWrite(6, HIGH); digitalWrite(7, LOW); digitalWrite(9, LOW); digitalWrite(10, LOW); }

This function is for writing a one, but I have written one for all ten numbers already. The problem is that this only works for the first display. Does anyone know how I can edit this code to make four seven segment displays work together, and make it display full numbers like 8732 for example?

Thank you!

27
13
28
5
29
23
30
6

cross-posted from: https://programming.dev/post/5924204

This looks like a good entry point for people that want to get into embedded software with a course on Arduino hardware fundamentals.

It's a 10 hour course that includes 14 hands on projects.

Arduino for Everybody - Course Summary

Arduino for Everybody - Direct link to video

31
2

I read a hackaday(?) article a couple weeks ago about someone who got an open source esp32 prebuilt radio sniffer(?) and added a short range transceiver to turn it into a functional Walkie-Talkie-esque device. Does anyone have the link to the article? I thought I saved it somewhere but I can’t find it there or in my search history

32
1
Arduino Cookbook 3rd ed (www.oreilly.com)

I’ve been following this book while practicing on Arduino during the last 2 months, and I found it extremely helpful.

Tbh much of the content is already on the official documentation, but it’s more precise and directed in the book.

While the content itself is spot on, some of the code examples does not work/compile on the current Arduino ide.

Arduino

315 readers
1 users here now

Arduino is an open-source electronic prototyping platform enabling users to create interactive electronic objects.

founded 1 year ago
MODERATORS