Results 1 to 2 of 2
  1. #1
    300+ Forum Addict


    brianwilliamson's Avatar
    Join Date
    Oct 2005
    Location
    Gold Coast-AUSTRALIA
    Posts
    455
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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.
    Attached Images Attached Images
    Last edited by brianwilliamson; 05-15-2018 at 02:18 AM. Reason: pic

  2. #2
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    899
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    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