SPI, more SPI, and even MORE SPI?

Yes - the only thing I know about kernel and spi is the param in /boot/config.txt:

dtparam=spi=on

Never heard of spi-dev, but I keep the whole concept of the Linux kernel, and that even more obscure thing the Broadcom firmware, as the other black boxes for other people to worry about.

When I mentioned back dating the kernel to fix the garbled sound, it may have actually been the Broadcom firmware I had to back date - I just don’t remember, but now when I try something and hear garbled text-to-speech, I back out the update and clamp down the system with multiple backups.

2 Likes

Yup.

I’m glad there’s someone around here that knows what’s going on!
:wink:

2 Likes

I like that dream.

“Neurotics build castles in the air. Psychotics move in.”

2 Likes

And here I am looking for another layer of abstraction over that. :slight_smile:
/K

2 Likes

That abstraction layer is called “magic”.
:wink:

2 Likes

Ah yes, ROS - the “Robot Obfuscation System” we are looking to for enlightened robots.

Have you solved how to make bootable hot backups of Finmark?

I can shut down Dave and dd a backup on my Mac, but would like to not have to unplug and reinsert that SDcard.

Carl has this neat program “rpi-clone” that he uses to make bootable hot backups of Raspbian For Robots (or PiOS), but so far I haven’t had success on Dave cloning Ubuntu 20.04.

Update: Looks like the secret is to flash the target backup card first with Ubuntu 20.04, then rpi-clone to the target.

2 Likes

Current Raspberry Pi design allows you to set special “bit flags” on the board to select boot priority and fail-over policy if booting from a particular device fails.

(AFAIK) The default setting is to give boot priority to the SD card and fail-over to USB if a SD card is not there.

I believe you can set it to give boot priority to USB, and fail-over to the SD card.

You can load up a R4R image on a small thumb-drive and insert that when you want to make a backup.

Or, you can place a small partition on the SD card itself and jumper select booting to the “backup” OS the way I do.

I deliberately moved to a larger SSD, USB booting, and the ability to multi-boot different operating systems to avoid just that problem.

. . . . That is, after I split a fifth SD card in half that contained an irreplaceable image of Charlie’s OS while trying to swap SD cards!

Needless to say, it cost me about $70 each for several SSD drives, (not to mention the window next to me after I melted it swearing a blue streak!)

However, I now have a method for making fully restorable images of any OS on the drive and I don’t have to mess with fussy little micro-SD cards!

2 Likes

True enlightenment is not found in complexity, but in elegant simplicity.

Me.
The Tao of GoPiGo

2 Likes

That’s a great sounding platitude, but “True [robot] enlightenment” will be neither simple nor elegantly simple.

Or in hardware terms, a computer is a totally fixed complex organization of a billion elegantly simple electron junctions that require an equally complex organization of the three elegantly simple atomic functions (set, test, jump) to be useful for any truly usable task.

Perhaps joy is found in elegant simplicity, but reality is complex, messy, and anything but simple.

2 Likes

True, but I still can’t shake the feeling that these things are overly complex.

“Inside every large program is a small program struggling to get out.”

2 Likes

Moved to separate thread

1 Like

Guess what!

I found something that actually works with the GoPiGo-3!

One of my long-time desires was to have some kind of “secondary” display for Charlie where I could send important messages that are important even if the 'bot is running headless.

The people at WaveShare, (www.waveshare.com), have a series of e-Ink displays.

I bought a 2.13" two color, (red and black), e-Ink hat for Charlie:

This display has three interesting properties:

  1. It uses “4 wire” SPI, where there is also an additional chip-select pin.

  2. it is addressed as device 0,0 instead of the red board’s address of 0,1.

  3. Since it uses e-Ink technology, whatever is there remains there until it is explicitly removed - even when power is lost.

The result is that - apparently - the WaveShare e-Ink display does not interfere with the GoPiGo’s functionality.

The one BIG downside is that screen updates take like 3+ seconds each, so it can’t be used for real-time messaging or status.

Next steps:
Find a place for the SSD that’s not in the way of the display.

2 Likes

That is so cool! Congratulations on the success, and the exploration.

I doubt the information can be read and comprehended faster than that.

Perhaps put the display in a thread with a one message deep LIFO queue and Charlie will not have to wait for the display to update.

2 Likes

Actually, it’s so clumsy a display that I can only use it for static status at this point.

Viz.:

This allows me to post a “message to myself” about the configuration and other essential details.

Hopefully I will find out a way to make it more relevant.

One thing I do notice is that, occasionally, the display will update with a vertical-bar display artifact that I suspect is caused by contention on the SPI buss.  There’s probably a mutex I have to invoke somewhere to keep east and west separate. :wink:

P.S.
This message tells me:

  1. I am running GPGOS 3.0.1, (instead of 3.0.0)
  2. That I have fully updated the operating system and all the packages via apt-get.
  3. That the running kernel is a 32 bit kernel (instead of a 64 bit kernel - that’s one of my dip-switch selections) and that as a consequence Dex’s eyes are GREEN. (They’re blue if 64 bit)
  4. AND!  When I did the apt-get upgrade, I specifically excluded, (via an “apt-mark hold”) the pigpio packages.

This way, each operating system is self-describing on boot-up.

2 Likes

Here’s a small video of Charlie starting up.

https://www.mediafire.com/file/uscc58f88yxp83w/Charlie_e-Ink_Startup.mp4/file

Note:

  1. The original display is the display from the prior session.  e-Ink displays do not change unless explicitly commanded to change - even if power is lost.

  2. The first event is the initial “initialize and clear the screen” event.

  3. The second event puts the first part of the message on the screen.

  4. The third event adds the last line.

Each message is like updating a graphical display - you build a buffer that gets rasterized and “blitted” to the display.

If you accidentally put something where something else is, they’re combined, overwriting each other.

I suspect that all the flashing and blinking is the controller resetting all the dot elements to a known state, then blitting in the buffer.

2 Likes

Very cool.
I’m a little bit familiar with a board from AdaFruit that also has an e-ink display. That board has a sleep state which is VERY low power - the board will wake on a signal, or after a certain amount of time has passed (and will run a specific program when it wakes). Does your board do something like that?
/K

2 Likes

This board also has a very-low-power sleep state, but for an e-ink display it borders on being an oxymoron - e-ink doesn’t draw power unless it’s being changed.

If I remember rightly, the quiescent current borders on microscopic and the sleep current is infinitesimal.  I really didn’t see the reason to put it to sleep, as the steady-state current of everything else is so much larger by comparison, it seemed pointless. . . .

2 Likes

I know the display itself doesn’t, but wasn’t sure about the driver board.
/K

2 Likes

The driver board draws some current, but it’s really trivial when compared to the current draw of everything else.

2 Likes

For those of you who are interested, here is the entire startup sequence.

https://www.mediafire.com/file/1sb6jf873h7w8fp/Charlie%2527s_Startup_Script_-_timed.mp4/file

The audio, if you can hear it, has me “start!”(ing) the script at about four seconds into the video.  The display script has ended when the pan-and-tilt servos begin moving, so I used that to indicate end-of-script.

Total time from clicking on the script to servo movement was about 30 seconds.

Here’s the script itself, if you’re curious.

check_os_bitness.sh.txt (4.5 KB)

I could put it in a code-block, but it would be a wall of words.

P.S.
It won’t run stand-alone.  It needs a bunch of supporting libraries too.

2 Likes