Shop OBEX P1 Docs P2 Docs Learn Events
Graphics — Parallax Forums

Graphics

How does one program graphics with the propeller, lets say if you are making a radar with a ping))) ultrasonic sensor and wanted to also have a radar look alike animation program, how is this done?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2015-11-15 16:07
    There's a graphics object in the Propeller Object Exchange that draws lines, circles, text, etc. into a screen buffer. There are also TV and VGA display drivers included with the graphics object that take the contents of a screen buffer and generate appropriate video signals for a display. Look through the Object Exchange. It's pretty straightforward.

    If you have enough hub RAM available and a small enough graphics buffer, you can have two buffers, one for display and one for writing into. Each time you update the image, you copy one buffer into the other. This makes for a smoother display in most cases. With only a single buffer, you have to first erase any lines or text that you don't want, then draw the new stuff ... the display flickers ... sometimes it's ok and sometimes it can be very annoying.
  • I guess
    I forgot to mention C instead of Spin... that's Spin only right?
  • Yes, it's written in a combination of Spin and assembly
  • So basically all I need is the propeller tool?
  • If you are willing to learn Spin and use Windows, then all you need is the Propeller Tool.

    If you want to use OSX or Linux, you can use PropellerIDE or BST. PropellerIDE is the current and open source recommended solution. It uses the OpenSpin compiler, which, if you wanted to, you could use with your own text editor. I use BST, since I started before PropellerIDE was a thing and never bothered to switch. BST has been long discontinued and is closed source but (at least in my experience) is been easier to install.
  • So nothing for C or C++ language huh?
  • kwinnkwinn Posts: 8,697
    Franny wrote: »
    So nothing for C or C++ language huh?

    Simple IDE for C, C++
  • I just googled it and found this: http://code.google.com/p/propgcc/source/browse/demos/pong/pong.c?name=v0_3_3&r=6ee772c086ef86352e09534e5e73dccabd986950. Hopefully it might be of some help to you.

    I would still recommend you learn Spin. It really is better than C/C++ for the Propeller, and a large body of Spin libraries is already available for interfacing with many hardware peripherals, much larger than that available for PropGCC.
  • kwinn wrote: »
    Franny wrote: »
    So nothing for C or C++ language huh?

    Simple IDE for C, C++

    That's what I got but can you make a radar like graphics on simple IDE?

  • kwinnkwinn Posts: 8,697
    I program the propeller in spin and pasm, but I'm sure you can do this in C/C++ as well.
Sign In or Register to comment.