Author Topic: Charlieplex Kit Marquee Code  (Read 11367 times)

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« on: January 04, 2013, 07:06:00 pm »
Hey Folks,
I've been toying around with the Charlieplex kit and made some code to output scrolling text. Check it out:

https://github.com/dmcinnes/charlieplex-marquee

Anyone know a way I could also run the USB serial interface at the same time? I know the CharliePlex kit is already using the serial interface pins, but is it possible to disable DigiUSB when I'm showing text but enable it when it's done? It would be cool to have a miniature text display using this kit, maybe one that accepts output from OS X Notification Center or Growl.
« Last Edit: January 04, 2013, 07:08:19 pm by dmcinnes »

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Charlieplex Kit Marquee Code
« Reply #1 on: January 04, 2013, 09:52:19 pm »
I don\'t think that could work - the USB pins are bidirectional, so they would make the LEDs flash and would probably interfere with the connection.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Charlieplex Kit Marquee Code
« Reply #2 on: January 04, 2013, 11:36:37 pm »
That would be very tough to do - I\'d think you\'d need some sort of switch on the lines - like a transistor - that was controlled by P5 to cutoff the connection to the LEDs - which would mean no direct plug in of the shield...

I think the better solution would be a LED matrix with an I2C driver and then use code similar to the USB2LCD code in the newest release (going up any moment now)

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« Reply #3 on: January 05, 2013, 03:57:59 pm »
I figured as much :) No harm in asking though!

I\'ve uploaded a video of the marquee in action:
http://www.youtube.com/watch?v=s9DNU_1o9C8

« Last Edit: January 05, 2013, 03:58:12 pm by dmcinnes »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Charlieplex Kit Marquee Code
« Reply #4 on: January 05, 2013, 10:18:14 pm »
@dcminnes - this is a really cool example - can I include it in the next release?

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« Reply #5 on: January 05, 2013, 11:12:25 pm »
@digistump Thanks! Go for it :)

plexer

  • Newbie
  • *
  • Posts: 38
Charlieplex Kit Marquee Code
« Reply #6 on: January 06, 2013, 07:19:05 am »
Looks great is it possible to slow down the scrolling at all?

Ben

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« Reply #7 on: January 06, 2013, 10:07:41 am »
@plexer it moves every 100ms, just change this line to be a higher number:

https://github.com/dmcinnes/charlieplex-marquee/blob/master/charlieplex.ino#L106

I\'m going to pull out a few of these magic numbers as #defines to clear it up a bit

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« Reply #8 on: January 06, 2013, 10:28:21 am »
@plexer OK cleaned up the code a bit, just change the SPEED constant -- it\'s in \"pixels\" per second:

https://github.com/dmcinnes/charlieplex-marquee/blob/master/charlieplex.ino#L8

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Charlieplex Kit Marquee Code
« Reply #9 on: January 06, 2013, 06:28:48 pm »
This is heaps cool!!!

plexer

  • Newbie
  • *
  • Posts: 38
Charlieplex Kit Marquee Code
« Reply #10 on: January 08, 2013, 11:50:24 am »
@dmcinnes great just soldered up my charlieplex shield this evening and running your code on it good job.

I have to say with the shield though I think soldering the headers before the leds would be easier.

Ben

dmcinnes

  • Newbie
  • *
  • Posts: 21
Charlieplex Kit Marquee Code
« Reply #11 on: January 08, 2013, 11:05:46 pm »
@plexer and @Bluebie thanks!

I had a hard time with the headers too. Maybe the 6 pin header first, then the leds then the 3 pin header so it\'s not too crowded.

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Charlieplex Kit Marquee Code
« Reply #12 on: January 08, 2013, 11:45:59 pm »
I think it\'d be a lot easier to assemble if first you trim the wires on all of the LEDs to be slightly longer than they need to be to go through the holes in the board, then solder them all at once. I had a lot of trouble getting the LEDs to lay flat against the board, and soldering and trimming each row of leads one by one was messy, slow, and not very fun.

plexer

  • Newbie
  • *
  • Posts: 38
Charlieplex Kit Marquee Code
« Reply #13 on: January 09, 2013, 02:40:04 am »
I did them a row at a time and pushed them and the board in to some bluetack. It certainly helped mine all stay pushed against the board.

http://youtu.be/2SnG5nOkE_g

Thinking of putting some film in front of it to dull the display slightly as those litle leds are bright.

Ben

shawn

  • Newbie
  • *
  • Posts: 8
Charlieplex Kit Marquee Code
« Reply #14 on: January 11, 2013, 01:27:41 pm »
Thanks for this code @dmcinnes, It\'s great! I just finished soldering up my charlieplex and now it\'s actually doing something fun and useful!

I agree it would be great to be able to control it via the usb connection. doesn\'t sound feasible though.