lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Assistance required rgarding TM1637 module

Tue Jan 31, 2017 6:51 am

we have just recieved two of these https://www.aliexpress.com/item/4-Bits- ... spberry-PI. We are looking for any help and advise with wiring and pinouts for use with our Pi-3's Also what would be the best code to use to allow us to use them as clocks??

looking forward to any and all assistance..

regards
Lohts
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

User avatar
DougieLawson
Posts: 36576
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Assistance required rgarding TM1637 module

Tue Jan 31, 2017 9:11 am

https://github.com/johnlr/raspberrypi-tm1637

That's bit banging it on GPIO20 (DIO) & 21 (CLK).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Assistance required rgarding TM1637 module

Tue Jan 31, 2017 2:21 pm

DougieLawson wrote:https://github.com/johnlr/raspberrypi-tm1637

That's bit banging it on GPIO20 (DIO) & 21 (CLK).
but what about the gnd and vcc pins



also I get
File "tm1637.py", line 5
<!DOCTYPE html>
^
SyntaxError: invalid syntax

when I try to run the file

now getting

Traceback (most recent call last):
File "tm1637.py", line 6, in <module>
from wiringpi2 import wiringPiSetupGpio, pinMode, digitalRead, digitalWrite, GPIO
ImportError: No module named wiringpi2


and now

tm1637.py:6: DeprecationWarning: The wiringpi2 module has been deprecated, please 'import wiringpi' instead.
from wiringpi2 import wiringPiSetupGpio, pinMode, digitalRead, digitalWrite, GPIO
wiringPiSetup: Must be root. (Did you forget sudo?)

typed sudo python tm1637.py and now gives me

sudo python tm1637.py
tm1637.py:6: DeprecationWarning: The wiringpi2 module has been deprecated, please 'import wiringpi' instead.
from wiringpi2 import wiringPiSetupGpio, pinMode, digitalRead, digitalWrite, GPIO
Traceback (most recent call last):
File "tm1637.py", line 141, in <module>
show_ip_address(tm)
File "tm1637.py", line 118, in show_ip_address
ipaddr = subprocess.check_output("hostname -I", shell=True, timeout=1).strip().split(b".")
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'timeout'

Am total out of my depth here step by step instructions would be fantstic and a huge help please
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

User avatar
DougieLawson
Posts: 36576
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Assistance required rgarding TM1637 module

Tue Jan 31, 2017 8:08 pm

lohtse wrote:
DougieLawson wrote:https://github.com/johnlr/raspberrypi-tm1637

That's bit banging it on GPIO20 (DIO) & 21 (CLK).
but what about the gnd and vcc pins
Connect them to GND and Vcc (3V3).

https://pinout.xyz
https://github.com/rm-hull/wiringPi has python stuff and should be an OK replacement for WiringPi2.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Assistance required rgarding TM1637 module

Tue Jan 31, 2017 8:21 pm

DougieLawson wrote:
lohtse wrote:
DougieLawson wrote:https://github.com/johnlr/raspberrypi-tm1637

That's bit banging it on GPIO20 (DIO) & 21 (CLK).
but what about the gnd and vcc pins
Connect them to GND and Vcc (3V3).

https://pinout.xyz
https://github.com/rm-hull/wiringPi has python stuff and should be an OK replacement for WiringPi2.

eeeer um no idea what that means or even the error messages I got in last post in this thread.
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Assistance required rgarding TM1637 module

Wed Feb 01, 2017 7:39 am

Finally got this working I had to remove the lines that the errors referred too


File "tm1637.py", line 141, in <module>
show_ip_address(tm)
File "tm1637.py", line 118, in show_ip_address
ipaddr = subprocess.check_output("hostname -I", shell=True, timeout=1).strip().split(b".")
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'timeout'


Once they had been removed all worked as it should....

Question is what are those lines for???
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

User avatar
DougieLawson
Posts: 36576
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Assistance required rgarding TM1637 module

Wed Feb 01, 2017 7:45 pm

Try running it with python3.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

lohtse
Posts: 50
Joined: Sun Jul 24, 2016 6:16 pm

Re: Assistance required rgarding TM1637 module

Thu Feb 02, 2017 6:38 am

DougieLawson wrote:Try running it with python3.
have it running fine now just without those lines mentioned... the question was what was they for?
3x Pi-3 1 x Pi-2 1 x Pi-B+ 1 x Pi-B 2 xPi-Zero 1 x Pi Zero W and a massive ever growing box/room of bits and bobs for them!

Return to “Automation, sensing and robotics”