Hello, I would plug a DS18B20 probe on pico explorer ? Can I use GP 2 direct acces given by pico explorer as 1 wire line of Pico Pi ?
Should be OK as it is not used by the screen.
I concur, it looks like it just goes to the header. A male jumper will bring it over to the solderless breadboard. Or just connect right to the header.
This works for me.:
import machine, onewire, ds18x20, time ds_pin = machine.Pin(1) ds_sensor = ds18x20.DS18X20(onewire.OneWire(ds_pin)) roms = ds_sensor.scan() print('Found DS devices: ', roms) while True: ds_sensor.convert_temp() time.sleep_ms(750) for rom in roms: print(rom) print(ds_sensor.read_temp(rom)) time.sleep(5)
Found DS devices: [bytearray(b’(\x10\xc3y\xa2\x00\x03I’)]
Thanks for answers. In code “machine.Pin(1)”, is it GP0 which is used ?
GP1 - second one down on the left if the USB is at the top and the printed Raspberry the right way up.