Jump to content
LaunchBox Community Forums

Inexpensive scrolling marquee


Recommended Posts

Inexpensive scrolling marquee

View File

First, I am not a developer, so I am sure this can be improved on.

This is a way to get a scrolling marque for aprox $100 Canadian.

I did a quick video of it working in attract mode;

It uses the following hardware:

Elegoo LYSB01H4ZDYCE-ELECTRNCSMEGA 2560 R3 Board ATmega2560 ATMEGA16U2 with USB Cable Compatible and Arduino - $20

BTF-LIGHTING WS2812B RGB 5050SMD Individually Addressable Digital 8x32 256 Pixels 12.5in x 3.1in LED Matrix - $50

Power options for panel, can use 5v from a PC power supply (red wire) or a power brick with 2 amps or more. This is based on just scrolling text, if you start doing graphics or lighting a lot of LEDs, get a real power supply,

These were purchased off Amazon.ca. Read on the panel, as again, if you light a lot of LEDs it will draw a lot of power.

I provided the code for the Arduino, That I want to give credit to Cyan Infinite, although I did edit the code some.

see sketch.serial.text.ino

Cyan Infinite | Scrolling text with flexible 32x8 RGB LED Matrix

I started with a generic UNO, but it seemed a bit underpowered, so changed to a generic Mega board.

Note, later when I built the Python code, I had an issue with 2 odd characters being displayed at the beginning of my scrolling text which I suspect was a communication setting for the com port, but not positive. That is why I used a substring command.

I used pin 49 to send the data to the panel, as it was close to a ground. You need a data and a ground, and the pin you use must match the one identified in the code. If you use a UNO, the pin numbers are different range, I had used 6 then for example.

You need to set the com port for your board. That can be done in a couple ways, one is Device Manager, Properties, Ports, USB Serial Device, Port Settings, Advanced. My code uses Com 3. You can adjust this, but will need to compile the Python then and not use the supplied exe.

The python script will set the options in windows to match the Sketch settings (although I think I may have an error per my Note above)

The send_com.py is the source code for send_com.exe.

I tried to use the py file, but bigbox didn't like that. I actually started with a basic .bat file, but the popup window was messing things up. I'll paste that at the bottom for enquiring minds. The port settings may not match the sketch though, so if you use it, adjust it.

If you want to use different port or port settings, you will need to recompile. Up to you where you put the send_com.exe, but note that windows antivirus deems it a security risk when you try running it, it will block it and remove the file, so you will need to exclude it, I found it easiest to create a subfolder and exclude the subfolder from scanning. SEE V 1.02 or newer, recommend use of the ZIP version and not the single file exe to avoid this issue. If you are concerned I am providing malicious code, read the .py file and compile it yourself. Not going to try to tutorial that, I'm a novice at best and there is lots of info on the web. For some reason windows antivirus does this with all py files compiled as a single file exe, at least ones compiled using pyinstaller.

See the screenshot for the LaunchBox LEDBlinky settings. Browse to where you put the send_com.exe file, your path will not likely be same as mine.

So there are a couple things I don't like about my solution. LaunchBox and BigBox don't seem to be coded exactly the same for what to send to LEDBlinky for parameters. I didn't test LaunchBox really. Think it is close though. It does not send the Platform name (MAME, Playstation, etc...) when scrolling the Platform wheel, or I couldn't figure it out. If you navigate to a Platform (like MAME) in BigBox, it will show the game followed by platform, If you move the Game wheel, it will update to the game. If you select the game, it will update to the game. BUT if you navigate up a level, I could not find any content sent. That would be ok going from Game Details to Game Wheel, but not so going from Game Wheel to Platforms. And this all uses the same level code of 8 (the first passed parameter). I would like to code around that sometime, but have a bunch of learning to do...

Feel free to update this if you like. If you find it useful, excellent :)

 


 

Edited by mobarton
Added video of completed cabinet
Link to comment
Share on other sites

  • 2 years later...

@mobarton hi. First of all, thank you for your great effort to do such awesome project. 

I am trying to build mine to, just like yours. But i do running some problems with the python code, it doesn´t work out for me. No characters showing on my panel at all. 

The bat file works better, but there is some characters not showing, for exemple "big box" just shows "g box" , all words has cut off the first 2 caracters.

I dont know why this is happening . Could you give me some help please?

Edited by doubleoseven
Link to comment
Share on other sites

Posted (edited)

I had trouble with the com port and baud rate for send_com when first trying this. The arduino changes ports when newly plugged in sometimes if the pc is reset or you change usb ports. That would be my first guess. The file is currently set to 'COM3', 115200

I don't recommend using the bat for anything except testing initially. The python works way better 

Edited by mobarton
Link to comment
Share on other sites

my computer serial port is COM8. I had changed the baud rate to 115200. I don´t know well how to compile in python and make a exe file. I not a programmer too. 

My best case scenario was when i used the bat file on big box. But unfortunately cutoff the first 2 letters of the senteces. 

Link to comment
Share on other sites

8 minutes ago, doubleoseven said:

my computer serial port is COM8. I had changed the baud rate to 115200. I don´t know well how to compile in python and make a exe file. I not a programmer too. 

My best case scenario was when i used the bat file on big box. But unfortunately cutoff the first 2 letters of the senteces. 

Edit the adreno code,  incomingString.substring(2,152), change the 2, to 0, in all places then upload it.

You can also change the port in the python code or change the port in Windows device manager. If you can get python working it is more stable

Link to comment
Share on other sites

2 hours ago, mobarton said:

Edit the adreno code,  incomingString.substring(2,152), change the 2, to 0, in all places then upload it.

You can also change the port in the python code or change the port in Windows device manager. If you can get python working it is more stable

 could you help me to create the python file exe please?

Link to comment
Share on other sites

If you change your port, the one attached should work. 

I don't have a pc set up for python currently, I can't promise when I would get around to working with it again. With some reading on compiling python you should be able to set yourself up. If I get around to it i can try, but no idea when that would be

Link to comment
Share on other sites

16 hours ago, mobarton said:

If you change your port, the one attached should work. 

I don't have a pc set up for python currently, I can't promise when I would get around to working with it again. With some reading on compiling python you should be able to set yourself up. If I get around to it i can try, but no idea when that would be

Sorry, but i already changed the port to 8 and 3 like yours. Either they works. 

I don´t know what i am doing wrong. Python code doesn´t work at all, even changing  ports compiling and converting to exe file. 

No idea what to do anymore. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...