Text scrolling on Parallax #27977, 2x16 LCD w/Prop

Is there a way to make text scroll across the screen on the Parallax 2x16 backlit LCD (#27977) with the regular FullDuplexSerial.Spin driver that comes with Prop Tools, or do I need to learn how to code with a different display driver for that?

I did find one object in the OBEX, LCD routines by Chris Gadd from 2013 that seems to have scrolling capability, but that appears to be for a parallel LCD of some sort, and I didn't see any for serial LCD at first glance.
Thanks for any pointers in the right direction!
Here's a recent pic of where I've gotten so far. Would be neat if I could scroll a longer message across the screen, though. :cool:

Stingray.jpg
800 x 630 - 100K

Comments

  • 7 Comments sorted by Date Added Votes
  • That is one cool looking robot! The Pings are mounted on servos?

    You pretty much have to scroll by hand:
    repeat pointer from TextStringStart to TextStringEnd
       fds.char(cursorSet)
       fds.str(pointer)
       waitcnt(clkfreq/10+cnt)
    

    will scroll a message from right to left.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
    Cool, CA, USA 95614
  • JonnyMacJonnyMac Posts: 5,868
    edited November 20 Vote Up0Vote Down
    As Tom points out, you have to do it manually. I tend to create messages with leading and trailing spaces so that the message can be scrolled on and off the LCD using a method like this:
    pub scroll_message(p_msg)
    
      repeat strsize(p_msg)-COLS
        term.tx(LINE0)
        repeat idx from 0 to COLS-1
          term.tx(byte[p_msg+idx])
        time.pause(75)
        p_msg += 1
    

    Off topic: What are you using for the serial connection between the RPi and the Propeller? I've started working with Lazarus and am looking for a x-platform serial component that I can use with Windows and the RPi.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • DrPopDrPop Posts: 165
    edited November 20 Vote Up0Vote Down
    Thanks for the code examples, I'll see if I can figure out how to do it when I get some time in the next few days. :smile:

    @Tom - Yeah, it's a Parallax Stingray with the two Pings on servos, and I really like the look of it. Although I honestly can't say if it works any better than 3 stationary servos up front, it gave me a convenient place in the middle for the Sharp IR sensor.

    @Jon - sorry to be a disappointment, but the R Pi isn't actually hooked up to the Prop yet. I had just test fitted my mounting idea before that photo. I have Bill Henning's Robo Pi that I want to use eventually with the R Pi 3 in place of the Stingray's board, but I have to buy motor controllers before I can use the Robo Pi, and I haven't decided on which to go with yet.
    The long term goal is to make it sophisticated enough that it can run the Scanse Lidar and transmit 1st person video wireless from the R Pi to a phone or computer, and just have the Prop controlling the sensors and motors.
    ...with my low level programming ability right now, it might be awhile until I get there, but I'm learning more every day!

    Here's the PNY battery pack I just got on sale at Fry's to power the Pi - it's 10,400mAh, and can do 2.4A out, so hopefully that'll work.
    The Prop and motors are currently powered by Parallax's 7.4V Li-ion Power Pack.
    400 x 330 - 8K
  • Nice looking Stingray. That looks like a great Bot Platform.
    Thanks for the link to the Robo Pi board. It's a nice compact multi servo platform.

    JonnyMac wrote: »
    Off topic: What are you using for the serial connection between the RPi and the Propeller? I've started working with Lazarus and am looking for a x-platform serial component that I can use with Windows and the RPi.
    You should be able to use PuTTY on both Windows and Linux(RaspPi). Also, on the RasPi you can use something like Minicom or 'screen' to connect to serial ports such as a UART on the Propeller. I do this with Bluetooth connections to the Propeller.
    https://elinux.org/RPi_Serial_Connection

  • You should be able to use PuTTY on both Windows and Linux(RaspPi). Also, on the RasPi you can use something like Minicom or 'screen' to connect to serial ports such as a UART on the Propeller. I do this with Bluetooth connections to the Propeller.

    I want to write a custom app that works on Windows (testing) and can be recompiled for the RPi (deployment) -- both devices need to speak with my board via USB. I was hoping @DrPop had done that and could offer some insight. I know others -- the key is finding the correct Lazarus serial component that will work on both OSes.
    Jon McPhalen
    Hollywood, CA
    It's Jon or JonnyMac -- please do not call me Jonny.
  • JonnyMac wrote: »
    I want to write a custom app that works on Windows (testing) and can be recompiled for the RPi (deployment) -- both devices need to speak with my board via USB. I was hoping @DrPop had done that and could offer some insight. I know others -- the key is finding the correct Lazarus serial component that will work on both OSes.

    Sorry I don't speak Pascal. I've only done this with Python and C.

    This might interest you though:
    wiki.freepascal.org/Hardware_Access

  • I have the book, Exploring Raspberry Pi, Interfacing to the real world with embedded Linux by Derek Molloy, and Ch. 11 shows three ways to do real-time interfacing w/ the Arduino, which I suppose would be more or less the same with the Propeller, right? Do any of these help?

    1. Serial Slave (pg 457) Using a UART connection to establish a slave-processor framework.
    2. An I2C Slave (pg 464) Configuring the Arduino (or Prop?) as an I2C slave allows for a large number of connections.
    3. An SPI Slave (pg 476) Apparently this allows for fast, high-level interaction between the Pi and the Arduino (Prop?) limited only by clock frequency, but is more complicated...

    512 x 800 - 109K
    539 x 800 - 126K
    545 x 800 - 127K
Sign In or Register to comment.