Python Forum
Python code weather Led sign
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python code weather Led sign
#21
We talk the same thing - my link is to same metral's repo.
so first lets make inventory of the available packages

1. currently you are using this one
pyledsign by BrightLedSigns - https://docs.python.org/3.6/reference/ex...nd-binding https://github.com/BrightLedSigns/pyledsign
As far as I can see that's the manifacturer, so that's sort of "official" one. Only available as GitHub repo. I cannot find it on PyPi

2. led_sign by metral - https://github.com/metral/led_sign
That's "unofficial" one, python fork of some Rubi code, as per Readme.md

Quote:Description: Python fork of Ruby code: https://github.com/pshved/muni-led-sign/

3. pyledsign, available on PyPi - package with the same name as the "offical" one, but for totaly different sign. It does not support MiniSign. So let's forget it.


Now, the two line display.
1. Did you try with the official package pyledsign to pass some text with new line in it:

from pyledsign.minisign import MiniSign
mysign = MiniSign(devicetype='sign')
# queuemsg queues a message to be sent with the send method
mysign.queuemsg(data= 'text on line1\ntext on line2')
mysign.sendqueue(device='/dev/ttyUSB0')
and also, to supply list, e.g.

from pyledsign.minisign import MiniSign
mysign = MiniSign(devicetype='sign')
# queuemsg queues a message to be sent with the send method
mysign.queuemsg(data= ['text on line1', 'text on line2'])
mysign.sendqueue(device='/dev/ttyUSB0')
what is the result? Maybe neither of this will work, but let's try

2. Now, if you are ready to switch to using metral's unofficial package - he supply the text of the 2 lines as a list, see lines 6,7,8 and 13 in test.py file. However that means to refactor your code as per his example.
Reply
#22
(May-17-2017, 06:43 PM)buran Wrote: We talk the same thing - my link is to same metral's repo.
so first lets make inventory of the available packages

1. currently you are using this one
pyledsign by BrightLedSigns - https://docs.python.org/3.6/reference/ex...nd-binding
As far as I can see that's the manifacturer, so that's sort of "official" one. Only available as GitHub repo. I cannot find it on PyPi

2. led_sign by metral - https://github.com/metral/led_sign
That's "unofficial" one, python fork of some Rubi code, as per Readme.md

Quote:Description: Python fork of Ruby code: https://github.com/pshved/muni-led-sign/

3. pyledsign, available on PyPi - package with the same name as the "offical" one, but for totaly different sign. It does not support MiniSign. So let's forget it.


Now, the two line display.
1. Did you try with the official package pyledsign to pass some text with new line in it:

from pyledsign.minisign import MiniSign
mysign = MiniSign(devicetype='sign')
# queuemsg queues a message to be sent with the send method
mysign.queuemsg(data= 'text on line1\ntext on line2')
mysign.sendqueue(device='/dev/ttyUSB0')
and also, to supply list, e.g.

from pyledsign.minisign import MiniSign
mysign = MiniSign(devicetype='sign')
# queuemsg queues a message to be sent with the send method
mysign.queuemsg(data= ['text on line1', 'text on line2'])
mysign.sendqueue(device='/dev/ttyUSB0')
what is the result? Maybe neither of this will work, but let's try

2. Now, if you are ready to switch to using metral's unofficial package - he supply the text of the 2 lines as a list, see lines 6,7,8 and 13 in test.py file. However that means to refactor your code as per his example.
First one /n puts an x on screen and proceeds to run the text on single line, second one draws long string of attribute error: 'list' object has no attribute 'replace' , so I am assuming that means that will not work either.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Does @ at sign used for tother than decorators? ggpython000 1 495 Oct-12-2023, 09:08 AM
Last Post: buran
  Python rule about the space character surrounding the equal sign ineuw 10 1,514 Sep-21-2023, 09:17 AM
Last Post: ineuw
  Need to sign JWT token with JWK key stucoder 1 1,648 Feb-21-2022, 09:04 AM
Last Post: stucoder
  i making a terminal sign up website thing Kenrichppython 1 1,658 Nov-04-2021, 03:57 AM
Last Post: bowlofred
  Style question on adherence to PEP 8 with whitespace near an "=" sign nilesh 6 3,846 Jan-12-2021, 11:11 PM
Last Post: snippsat
  Mathematical Conversion Scripts for Weather Station Mickey53usa 11 4,488 Jun-24-2020, 03:14 AM
Last Post: buran
  Parsing Date/Time from Metar Reports with 6 hourly weather information Lawrence 0 2,289 May-03-2020, 08:15 PM
Last Post: Lawrence
  Syntax Error with = sign and more Kathleen57 3 2,577 May-03-2020, 03:52 AM
Last Post: buran
  Handling pound sign (#) within custom URL chisox721 5 6,442 Apr-02-2019, 10:01 PM
Last Post: chisox721
  Sign XADES-EPES Python pedro86porras 2 4,175 Nov-02-2018, 04:31 PM
Last Post: pedro86porras

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020