There seems to be a recurring statement that the GP sockets on the side of the unit connect to the keyboard processor. They do not, as confirmed in the schematic, and by buzzing them out for continuity.
So this doesn’t explain why, when I use a DS18B20 or a DHT11 sensor on any of these pins, I get 1000 (error) back.
Could someone who has got this working please share their exact setup and code so I can see why its not working for me? I am using a Pico 2W with the webmite build if that matters.
I don’t know about the DS18B20, but this code works fine for a DHT11 or DHT22.
Dim FLOAT temp, humidity
Do
’ The next line sets the GPIO pin, this will need to be
’ adjusted for the PicoCalc’s available pins.
Device HUMID GP28, temp, humidity
’ If you want the temp dispayed in Celsius
’ comment out the next 2 lines
f_temp = (temp * 1.8) + 32
temp = f_temp
The upper set of GPIO are connected to the Pico itself, The lower set of GPIO are connected to the STM32 chip that runs the keyboard. I hope that helps.
That’s a digital sensor, not an analog one and uses one-wire library (Arduino or Adafruit) I2C protocol. I think you can connect up to 13 sensors to only 3 connections (Vcc, GND and SIG) as each one has his own address. It might be that you need a resistor (don’t remember if it’s a pull-up or down) and you need to make sure if it’s the right voltage (3.3 or 5V). I’ve worked with them a couple of years ago, but on Arduino. I haven’t played with them on PicoCalc unfortunately.
So yeah, you need a 4.7kOhm pull-down resistor and make sure the Vcc is 5V and the SIG wire connected to a port declared as digital input. Hope that helps!
MMBASIC already implements the 1-wire protocol, it should just be a matter of connecting the sensor and its pull-up and running the TEMPR(GPx) function to get the temperature.