@Maximilian-Gerhardt this should be added in the examples! looks amazing! thank you!
Posts made by jeane soliva
-
RE: [need help] bought a 4 bits digital LED module
-
RE: [need help] bought a 4 bits digital LED module
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; }
-
RE: [need help] bought a 4 bits digital LED module
@Maximilian-Gerhardt awesome!! Fantastic job! I am glad it's working on to you.
-
RE: [need help] bought a 4 bits digital LED module
@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
-
RE: [need help] bought a 4 bits digital LED module
@Maximilian-Gerhardt sorry for the long wait. I had some problems building the toolchain. anyway, after editing some environment variables from your makefile, tried building your repo, and compiling it successfully I guess.
$ make mipsel-openwrt-linux-g++ -o tm1637_example_display -O3 -ggdb -g -Wall -Wextra -std=c++14 -I /home/docker-user/omega/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/include -I /home/docker-user/omega/omega2-tm1637/omega_includes -L /home/docker-user/omega/source/staging_dir/target-mipsel_24kc_musl-1.1.16/usr/lib -L /home/docker-user/omega/omega2-tm1637/omega_libs -L. example_display.cpp TM1637.cpp Arduino.cpp -loniondebug -lugpio In file included from Arduino.cpp:3:0: /home/docker-user/omega/omega2-tm1637/omega_includes/ugpio.h:57:39: warning: unused parameter 'gpio' [-Wunused-parameter] inline int gpio_is_valid(unsigned int gpio) ^ /home/docker-user/omega/omega2-tm1637/omega_includes/ugpio.h:73:39: warning: unused parameter 'gpio' [-Wunused-parameter] inline int gpio_cansleep(unsigned int gpio)
then after scp'ing to my omega, then running it.
Beginning to test program > exporting gpio 8 > setting to input > exporting gpio 9 > setting to input > setting to input > setting to input > setting to input > setting to input > setting to input t Goodbye
unfortunately, there is nothing displayed..
btw, does
uint8_t pinClk = 18; uint8_t pinData = 19;
needs to be 18 and 19? I don't have that.. I am using a power dock 1, not 2.. tried changing it to other GPIO, but still not working..
-
RE: [need help] bought a 4 bits digital LED module
@Maximilian-Gerhardt got your repository, thanks! give me some few time to sort building the mips toolchain.. hopefully, my build will succeed.
@György-Farkas thanks for the tip!
-
RE: [need help] bought a 4 bits digital LED module
こんにちは、honestly, I don't know how to thank you. if you can port that library, and doing something like
display.setSegment()
would really contribute a big value and great help among others too.. and I would be gladly to help testing it. this is my github if you plan to share it on github, invite me. thank you! -
RE: [need help] bought a 4 bits digital LED module
Greetings,
After working on for a few days and nights, I still don't get it.. I really sucks and noob. the concept of just switching the GPIO's is quite hard. I looked into the given libs to get some clue, but not progress.
this is the rough code that I got.
import time import onionGpio clk = 2 dio = 3 # gpioNum = 2 # gpioObj = onionGpio.OnionGpio(gpioNum) clkObj = onionGpio.OnionGpio(clk) dioObj = onionGpio.OnionGpio(dio) clkObj.setOutputDirection(0) dioObj.setOutputDirection(0) ## set to output # status = gpioObj.setOutputDirection(0) ## alternate the value loop = 1 value = 1 while loop == 1: # clkObj.setOutputDirection(value) # dioObj.setOutputDirection(value) # reverse the value if value == 0: value = 1 else: value = 1 # set the new value # status = gpioObj.setValue(value) # print 'GPIO%d set to: %d'%(gpioNum, value) print 'GPIO%d set to: %d val: %d %d'%(clk, clkObj.setValue(value), value, int(clkObj.getValue())) print 'GPIO%d set to: %d val: %d %d'%(dio, dioObj.setValue(value), value, int(clkObj.getValue())) time.sleep(5)
maybe programming web Softwares/Programs is different from here.. from that simple loop, something should happen, but I don't get anything.. I'm better of building web servers from golang/rust and crosscompile it to mips..
anyway, probably I can't just get this in a few days. will try to learn more from the internet.
-
RE: [need help] bought a 4 bits digital LED module
@unique1984 thanks for the video, quite length full, but I will watch it. it looks to be a good start!
-
RE: [need help] bought a 4 bits digital LED module
@Maximilian-Gerhardt thank you, that looks helpful. I will try it now.
-
[need help] bought a 4 bits digital LED module
Greetings,
I bought this item to be specific. just learning to program IoT stuffs, coming from web/software programming background (already wrote small programs for DHT11 that gets temperature and sends data to a remote server). And I am quite have no Idea where to begin with on how to display digits. I will be glad if anyone can guide me where to begin on how to display, 2 or more digits from that digital led module..
thank you in advance!
-
RE: Elixir instead of node ?
hi, is there any progress in here? I would like to run elixir or phoenix apps..