so I have tried a lot of examples and other code I have found online but nothing is remotely working with this set up and I need somewhere to start so I can build a timer with 2 Alphanumeric displays and a 3 way toggle switch. any help would be appreciated
without more information about what you want to do, I do not think we can help or point to some useful examples. Think about following question (but not limited to)
What is the project you want to build about?
why 2 Alphanumeric displays ? What do they need to show? when ?c
Why a 3 way toggle switch ? What should happen if toggled? Do you know which 3-way switch?
There likely won’t be a ready-made example, but you can probably get it done step-wise.
Try doing the default blink sketch first https://learn.sparkfun.com/tutorials/re … mple-blink then move on to getting a single alphanumeric working https://learn.sparkfun.com/tutorials/sp … no-library
…and then add in the switch and 2nd unit.
The timer is for Airsoft and there are going to be 2 teams Green and Tan. 1 screen for each team. so I guess technically 2 timers with the format of MM:SS. when the 3 way toggle is up green timer starts middle no timer is active and down is tan timer.
Thank you for your time
a lot of my problem seems to be I can’t put a variable into a digit or I am doing it wrong
so this is the code I created and all that displays is what appears to be a lowercase r in digit 0 and the colon is on
#include <SparkFun_Alphanumeric_Display.h>
#include <Wire.h>
HT16K33 display;
int minTen = 1;
int minOne = 2;
int secTen = 3;
int secOne = 4;
//char numbers = 1234;
void setup() {
// put your setup code here, to run once:
SerialUSB.begin(115200);
SerialUSB.println("SparkFun Qwiic Alphanumeric - Example 1: Print String");
Wire.begin(); //Join I2C bus
if (display.begin() == false)
{
SerialUSB.println("Device did not acknowledge! Freezing.");
while (1);
}
SerialUSB.println("Display acknowledged.");
}
void loop() {
// put your main code here, to run repeatedly:
int minTen = 1;
display.colonOn();
display.printChar('minTen', 0);
display.updateDisplay();
}
Attached a example as a starting point.
It handles 2 timers, 3-way toggle, 2 displays and you can provide keyboard input for reset, adjust brightness and adjust blinkrate.
It compiles, but it is not tested as I do not have these displays.
TimersExample.zip (2.34 KB)