damn got it now! finally. this is the sample code I got.
after setting HIGH
to LOW
in pinMode()
of Arduino.cpp
} else if (mode == OUTPUT) {
if ((rv = gpio_direction_output(pin, LOW)) < 0) {
perror("gpio_direction_input");
}
}
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "TM1637.h"
int main() {
int k;
printf("Beginning to test program\n");
uint8_t pinClk = 2;
uint8_t pinData = 3;
TM1637Display display(pinClk, pinData);
uint8_t data[] = { 0xff, 0xff, 0xff, 0xff };
display.setBrightness(0x0f);
display.showNumberDec(153, false, 3, 1);
sleep(2);
printf("Goodbye\n");
return 0;
}