Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
I’m completely new to this subject and just wanted to use the PicoMite project to learn BASIC with the help of a Raspberry Pi Pico. I installed the latest version of PicoMite from Geoffs website and read the manual. I have the Pico attached to my MacBook and use the Terminal App to code. Blinking LED works fine and the hardware is ok, I tested the display with MicroPython and I2C works fine at GP0 and GP1.
Now I wanted to use my SSD1306 OLED (128 x 64) with the Pico and MMBasic. I coded this:
OPTION SYSTEM I2C 1, 2 OPTION LCDPANEL SSD1306I2C, L
TEXT 0, 10, „Hello World“
For the first line I get the error message: „I2C already configured“ If I use other pins for I2C (like 4 and 5 or other) or if I write GP0, GP1 I get the same message
If I skip the first line I get the following error for line 2: „Invalid in a program“
What I’m doing wrong? I tried to find a kind of tutorial for this case but couldn’t find one (or just pieces which didn’t help me out)
Thank’s for your help! Edited 2022-04-29 15:32 by Vetinari
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2832
Posted: 07:18am 29 Apr 2022
Copy link to clipboard
Print this post
Try I2C CLOSE before each attempt to reconfigure the I2C.
From the manual
OPTION LCDPANEL SSD1306I2C, OR [,offset] Initialises a OLED display using the SSD1306 controller with an I2C interface. This supports 128 * 64 resolution. An additional parameter offset may be specified to control the position of the display. 0.96" displays typically need a value of 0. 1.3" displays typically need a value of 2. Default if omitted is 0.
NB many cheap I2C versions of SSD1306 displays do not implement I2C properly due to a wiring error. This seems to be particularly the case with 1.3" variants
Does your display need the offset parameter? Note the last line, do you have one of those?
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10620
Posted: 07:21am 29 Apr 2022
Copy link to clipboard
Print this post
From your post it appears that you are putting the option commands in the program. They should be executed just once from the command line. Start by doing OPTION RESET then the two option commands. Then the text command will work in a program or from the command line without anything else Edited 2022-04-29 17:21 by matherp