Skip to content

The Pi Piper – Blinking a LED From an MVS Application Program

May 4, 2018


I had managed to blink a LED the other day but it involved running in supervisor state to get hercules to issue a shell command and it was just pretty icky. I tried to sanitize it by directing the output of one of MVSs printers to a raspi LED but I kept getting I/O errors – the GPIO server looks like a dumb file at /sys/class/gpio/gpio18/value but while it happily responds to 1’s and 0’s it throws an error for anything else and i seemed always to get a blank or some other garbage at the end of a run.

I got around it by writing a small program to scrub the output and send only valid commands to the LED. I got the GPIO access code from this page and an example of the piping code from this one.

This is still a lot of moving parts, it’s output only, and probably unacceptably slow for any serious GPIO access but it’s a good place to stop. I’m going to see about putting a hook into the hercules emulator source to either do more direct passthrough or direct access to the GPIO’s.

Advertisements
One Comment

Trackbacks & Pingbacks

  1. Just For the Record – the OLED | olduino

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: