Shop OBEX P1 Docs P2 Docs Learn Events
spinning led display — Parallax Forums

spinning led display

PFloyd36069PFloyd36069 Posts: 135
edited 2008-10-29 13:30 in Propeller 1
Hi,

How would i make an object that would allow me to write the data for all the letters in the alphabet, then in my main program, be able to type in a message and let the object insert all the right data to make in show up on the display?

Thanks,

Bryan

Comments

  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-26 14:44
    That's BIG! Start by figuring out your LED letter size. Most of the LCD displays achieve a nice character set with 8x5 or 9x5 pixel grids.
    Are you starting from scratch or do you have the display already?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent, only $1.
    Send cash and signature to CannibalRobotics.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-26 15:02
    i already have the display working with a single row of 7 led's spinning at about 300 rpm. i am trying to figure out an easier way to write the message, rather than having to go through and type the data every time i want to change what it says.
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-26 15:05
    What's the interface to the display?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent, only $1.
    Send cash and signature to CannibalRobotics.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-26 15:20
    i have the 7 leds hooked up to pins 0..7 and i turn them on and off in certain sequences while they are spinning to make words.
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-26 15:24
    OK very cool!
    I think I understand your question now. What you are saying is that you have to completely reload the prop program every time you want to change the message? Do you just want to hook the prop up to a keyboard directly?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent, only $1.
    Send cash and signature to CannibalRobotics.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-26 15:26
    that would be sweet if i could but i have the whole prop spinning so i dont know kow i would hook it up.
    even just being able to type the message into the program without having to mess with the byte%01110010 sort of lines would be nice
  • CannibalRoboticsCannibalRobotics Posts: 535
    edited 2008-10-26 15:27
    What about an IR interface?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Signature space for rent, only $1.
    Send cash and signature to CannibalRobotics.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-26 15:28
    i dont have an ir reciever or that would work
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-10-26 15:34
    Hello PFloyd,

    make your definition of the characters in a DAT-section in the same order as ASCII-code

    Then you define a string like you would do it for using FullDuplexSerial with usual ASCII-code

    make a repeat loop that goes through the string by using an index

    from the ASCII-Code of a character you calculate the position of the pixel-definition inside the DAT-section

      'pseudocode 
      Adress_of_char := (ASCIIcode - OffsetValue) * NoOfBytesOfOneCharacter
    
    
      LED_On_Off_pattern := Pixels_of_char[noparse][[/noparse]Adress_of_char]
    
    
      'where OffsetValue is the difference between your first defined character and the ASCII-code
      'example beginning your pixeldef with "space" ASCII-code decimal 32
      'ASCII-Code - 32
      '"space" is your first character 
      ' "!" is second with ASCII-code 33   33-32=1 = second index in your DAT-section as index starts at zero
    
    DAT
      Pixels_of_char long %0_0000_0000_0000_0000, ..... 'Definition of "Character "space"
                     long %0_0000_0000_0000_0000, ... 'Definition of "Character "!"
    ....
    
                     long %0_0000_0000_0000_0000, ... 'Definition of "Character "A"
                     long %0_0000_0000_0000_0000, ... 'Definition of "Character "B"
                     long %0_0000_0000_0000_0000, ... 'Definition of "Character "C"
    
    'etc.
    
    



    best regards

    Stefan

    Post Edited (StefanL38) : 10/26/2008 4:09:57 PM GMT
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-26 16:32
    sorry for the brief description. I am not real good at the code part thats why asked for some advice... do it put the definition after the long%0_0000_0000_0000_0000, "HERE"
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-10-26 20:06
    Hello PFloyd,

    you can store different things in the DAT-section

    the "%"-symbol indicates binary values a "$" would indicate hexadecimal

    DAT
    byte "E" would be translated from the compiler as ASCII-coded values

    no your definition starts after the reserved word for the size
    as there are byte or word or long

    post your definition that you are currently using

    if your characters would be a 8x8 dotmatrix

    an "L" would be defined as shown below

    (look at the pattern of all the "1"s

    first for an easy view in separated lines.
    By using curved brackets in that way for the compiler this looks like the second version below
    The compiler "thinks" this is just one line

    
    DAT
      DotMatrixPixel byte %10000000,{
                         }%10000000,{
                         }%10000000,{
                         }%10000000,{
                         }%10000000,{
                         }%10000000,{
                         }%10000000,{
                         }%11111111
    
    'this is the way without curved brackets same function but harder to read
    
      DotMatrixPixel byte 10000000,10000000,10000000,10000000,10000000,10000000,10000000,11111111
    
    or you start a new line always beginning with the size
    
    DAT
      DotMatrixPixel2 byte 10000000
                      byte 10000000
                      byte 10000000
                      byte 10000000
                      byte 10000000
                      byte 10000000
                      byte 10000000
                      byte 11111111
                          
    
    



    to explain a little more
    the name "DotMatrixPixel" is free chosen by me
    the "%" indicates the values following are defined BINARY
    the comma separates the values from each other

    best regards

    Stefan
  • bdickensbdickens Posts: 110
    edited 2008-10-27 01:04
    Hey; I would love to see the hardware for this. I'm building one of these myself.
    Thanks
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-27 02:05
    well right now it is pretty crude...i have my prop with wires running all over, and it is zip tied to a floppy drive motor to spin it. if i can maybe ill post some pics.
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-27 02:48
    here is one pic of it running.... my camera died right after i took this one because i had the exposure cranked a little.
    1072 x 804 - 84K
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-10-28 01:44
    according to the circular path differences, and the apparent angle of the camera, the green led is constant lit and on a lower plane than the red leds?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quicker answers in the #propeller chat channel on freenode.net. Don't know squat about IRC? Download Pigin! So easy a caveman could do it...
    http://folding.stanford.edu/ - Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-10-28 12:36
    PFloyd:· You might be able to transfer data to the prop using a serial connection·through an inductive loop.· Just put two loops of wire concentric to the spinning axis of the amature.· On the receiving end, you could perhaps send the signal through a schmitt trigger to square it up.

    If I get some time later, I might provide a rough schematic.

    BTW:· How are you getting power to the Prop in that configuration?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 10/28/2008 12:41:53 PM GMT
  • PFloyd36069PFloyd36069 Posts: 135
    edited 2008-10-28 22:46
    you are correct, the green led is lower than the red ones, because that it the power led on my demo board. i have the whole board along with a 9v battery zip tied to the motor.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-10-29 13:30
    Here's just a rough schematic of an idea to transfer data to a spinning Propeller.· I have not tested this.

    After posting the picture, I realized I should have added a diode on the primary coil to take care of the spike, and possibly a current limiting resistor in series with the primary coil so you don't fry the transistor.· As I said, it's a rough schematic just so you get the idea.

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup

    Post Edited (Ken Peterson) : 10/29/2008 1:40:26 PM GMT
    552 x 268 - 10K
Sign In or Register to comment.