[need help] bought a 4 bits digital LED module
-
Tomorrow I'll have the real hardware and test and debug it. Could be a timing issue. Would have been a wonder if it worked on the first try anyways.
The GPIOs can be arbitrary. VCC and GND of the module have to always go to 3.3V and GND though.
I don't find a reference to Power Dock 1.. What pins are available there? But you are testing this on an Omega2, right?
-
@Maximilian-Gerhardt thanks! tried quick hacking the library, but no work.. my knowledge of writing data for this is still limited..
I am pretty sure I am using the correct device..
and the dock is this from that image, mine is quite different, the layout is different from the expansion.. I dont know why. don't have pins 21/20
-
You have VCC on +5V, but all the logic is on the Omega2 is 3.3V and the display module must also get 3.3V. That hopefully shouldn't have damaged the module or your Omega.. I'll see when I get the hardware
Edit: Hardware just arrived. Working on this this evening.
-
Found the bug. My Arduino abstraction layer was setting the pin to HIGH after it was initialized as OUTPUT pin, while the actual Arduino implementation sets it LOW. This is also what the code expects.
Changing
gpio_direction_output(pin, HIGH)
togpio_direction_output(pin, LOW)
inpinMode()
gives you the same result as on an Arduino Uno: (Test code activates all segments)Fix and more description will be in the repo soon. Now I should be able to write a python version.
-
@Maximilian-Gerhardt awesome!! Fantastic job! I am glad it's working on to you.
-
damn got it now! finally. this is the sample code I got.
after setting
HIGH
toLOW
inpinMode()
ofArduino.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; }
-
Repository was updated with a fixed version and better demo -- now the Python versions is coming.
-
Python version works!
-
@Maximilian-Gerhardt this should be added in the examples! looks amazing! thank you!
-
I connect Omega2 lte to "IOT" at T-Mobile with special SIM. I installed client openvpn machine and connection works with portal and get IP address . The omega2 lte makes only a connection to client if I enter terminal command "lted" ,It connects and gets IP . client can ping omega2 LTE. Command "lted"in terminal isn''t closed. Entering CNTR-C I get cursor back, but the connection via LTE shuts down. What Do I wrong or what is not correct configured```
-
@kottes Please create a new thread for this question, this thread is 3 years old. I'll answer on the new thread.