Quite a while ago I stopped working on SmallBASIC PiGPIO, a plugin for SmallBASIC on the Raspberry PI to access the GPIO pins, because I realized that the plugin was not compatible with the Raspberry Pi 5. Since quite a while I’m working on version 2 of SmallBASIC PiGPIO which comes with a lot of improvements and compatibility with the Pi 5. In principle it can even be used on other Linux Single Board Computers. If you are interested to try it out, you can find the documentation at SmallBASIC PiGPIO 2.
Great news but I don’t see a speed setting for I2C(?)
Hi Tinine, on the Raspberry Pi the I2C speed is set up in a system config file and it is applied at boot up of the system. Please have a look here for configuring the I2C speed: Change the Clock Speed | Raspberry Pi I2C Clock Stretching Fixes | Adafruit Learning System. Valid I2C speeds are 100kHz (default), 400kHz, 1MHz. According to I²C - Wikipedia some higher speeds are possible. So far I tried a SSD1306 display with 1Mhz and it worked fine.
I have installed small basic on a Pi 5 & Pi 3b+ all installed ok on both. But when I run a pre-configured program e.g led flash both Pi’s give the following error
Unit gpio.sbu not found or wrong version
Can you help please ?
Hi romba, this error message is displayed when the library was not found. If you have installed the library as Tinine posted and it is not working please execute make clean
. Then ./configure
and post the output here. Next make
and post the output, too.
How do you start the basic programs? Can you please post the command including the parameters.
Thank you for your help. Started afresh from make clean on Pi 3b and all working correctly on simple ‘examples’ . (LED and switches) . Looking forward to trying I2c.
Will re-look at Pi 5 tomorrow. I’m sure I will have done something wrong so will re-load Enjoying the experience !!
Awesome
Looking forward to the RPi5 report
Now making good progress on Pi5. Testing out graphics and all working fine. Still reading manual for further progress. Working now with I2C, ssd16x oled and the demo progs are working with this display. The I2C examples given have preconfigured libraries via import …. I would like to drive a PCF8574 are there BASIC i2c commands that I can use to read/write to this device (and other devices)? Not discovered in manual yet so sorry if I’ve missed it.
OK, found it !!! Can now connect and write & read …..
import i2c
Print “Connect to PCF8574”
pcf = i2c.Open(0x20, “/dev/i2c-1”)
i2c.write(pcf, 0xaa)
Really nice to hear, that everything is working so far. Thank you for the feedback.
Exciting stuff
Please keep us updated with progress