Sandgrounder
Posts: 31
Joined: Fri Jul 20, 2012 3:22 pm

Energenie on RISCOS and BASIC

Sat Oct 28, 2017 1:00 pm

Has anybody used the Energenie GPIO board on a Pi B+ with RISCOS, preferably coding in BASIC

An example program would be nice :)

The interface is unnecessarily complicated. All it needed was one GPIO pin which, when set, simulated the signal for button 1-ON on the normal remote control being pressed. Another pin for button 1-OFF etc.

dfeugey
Posts: 107
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: Energenie on RISCOS and BASIC

Sun Oct 29, 2017 7:37 am

GPIO support is integrated in RISC OS. There is some documentation for the module :
https://www.riscosopen.org/viewer/view/ ... GPIO%2C3d6

I think there is also a Basic library, but I can't find it.
It's very easy to use.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

Sandgrounder
Posts: 31
Joined: Fri Jul 20, 2012 3:22 pm

Re: Energenie on RISCOS and BASIC

Sun Oct 29, 2017 3:13 pm

dfeugey wrote:
Sun Oct 29, 2017 7:37 am
GPIO support is integrated in RISC OS. There is some documentation for the module :
https://www.riscosopen.org/viewer/view/ ... GPIO%2C3d6

I think there is also a Basic library, but I can't find it.
It's very easy to use.
I have the documentation. It looks as though it should be easy :) but I can not get it to work. :(

I my case with the Energenie pi-mote board, The LED is flashing when I expect it to .....
..... but the remore switch does not respond.

I still think an example would be good. (and/or the library)

neilf
Posts: 72
Joined: Sun Nov 11, 2012 8:14 am

Re: Energenie on RISCOS and BASIC

Sun Oct 29, 2017 8:54 pm

dfeugey wrote:
Sun Oct 29, 2017 7:37 am
GPIO support is integrated in RISC OS. There is some documentation for the module :
https://www.riscosopen.org/viewer/view/ ... GPIO%2C3d6

I think there is also a Basic library, but I can't find it.
It's very easy to use.
It's only built in if you're running RC15 (RISC OS 5.23), which includes GPIO v1.00. Earlier OS versions need Tank's GPIO module to be loaded. The module is available from http://www.tankstage.co.uk/Software/

Sandgrounder
Posts: 31
Joined: Fri Jul 20, 2012 3:22 pm

Re: Energenie on RISCOS and BASIC

Sun Oct 29, 2017 9:31 pm

Yes. I am running RC15 and have the documentation for the gpio module v1.0

I am now beginning to think that I may have a duff board (or, less likely) two duff switches, as the pi-mote will also not work on Linux with well publicised Python software. I have ordered another pi-mote board from a different supplier (Farnell CPC, who are usually good).

I do get a green LED lit on Linux as well as the red one I get on RISCOS, but I have not seen any documentation about what the LEDs are trying to say. Perhaps, something to do with the fact that the Linux is running an original Pi 1B, whereas the RISCOS is on a B+.

Any further help about GPIO on RISCOS BBC Basic would still be useful. :)

neilf
Posts: 72
Joined: Sun Nov 11, 2012 8:14 am

Re: Energenie on RISCOS and BASIC

Mon Oct 30, 2017 10:28 am

The RC15 GPIO module (v1.00) is very different from earlier versions and won't run with code (or libraries) written for the earlier GPIO modules.
It took me a while to get my old code to work on RC15 but I got there in the end. The RC15 GPIO StrongHelp file doesn't make clear what needs to be done in this respect.
As an aside, I couldn't get any of the earlier GPIO modules to work with the B+ when running RC14. They would appear to run my code but nothing appeared on the GPIO outputs - yet the same code worked fine on the B and Pi 2. The Pi 3 acted like the B+ when running RC14 - code ran but nothing happened to the outputs.
Now that I've finally got GPIO code running properly on the Pi 3 under RC15, I thought I'd try the B+ again, with RC15. Now the B+ GPIO outputs work as they should.
I still have other issues with RC15 (e.g. very slow screen update when switching to/from single-tasking Basic code), but the GPIO module is no longer one of them.


Return to “RISCOS”

Who is online

Users browsing this forum: No registered users and 7 guests