Results 1 to 2 of 2
Thread: Arduino voltage indicator
-
05-15-2018, 02:10 AM #1
Arduino voltage indicator
I have been trying to find out how switch the colon on, but so far no luck anywhere.
If someone has a clue how to do this, I would be most grateful .
Here is the code so far :
//To display 28.3v___needs colon installed
//Using 7segments x4 & 1637 arduino UNO
#include <Arduino.h>
#include <TM1637Display.h>
// Module connection pins (Digital Pins)
#define CLK 2
#define DIO 3
// The amount of time (in milliseconds) between tests
//#define TEST_DELAY 2000
const uint8_t SEG_DONE[] = {
SEG_A | SEG_B | SEG_G | SEG_E | SEG_D, //2
SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F | SEG_G, // 8
SEG_A | SEG_B | SEG_C | SEG_D | SEG_G, // 3
SEG_E |SEG_D | SEG_C // v
};
TM1637Display display(CLK, DIO);
void setup()
{
}
void loop()
{
int k;
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
display.setBrightness(0x0f);
// On/Off test
for(k = 0; k < 1; k++) {
display.setBrightness(2, false); // Turn off
display.setSegments(data);
display.setBrightness(2, true); // Turn on
display.setSegments(data);
}
// Done!
display.setSegments(SEG_DONE);
while(1);
}
//***************************************************
Regards..............Brian W.Last edited by brianwilliamson; 05-15-2018 at 02:18 AM. Reason: pic
-
05-15-2018, 03:26 AM #2
- Join Date
- Jan 2007
- Location
- NEW ZEALAND
- Posts
- 899
Re: Arduino voltage indicator
Brian,
Not familiar with Arduino code. Dont you just need to connect the dp to an output and then pull it high when
wanting to display it.
Les
13yo GIRLS FILE DOWNLOADS KIDS PACK DOWNLOAD WEBSITE: OPEN IN AN ANONYMOUS BROWSER (the link does...
5.Sharing an Essay about PIC16F877