1602 OLED display with Micro:Bit and potentiometer: MakeCode

preview_player
Показать описание
Code for this video. Due to a bug in the OLED blocks it will show two displays on the simulator. Just ignore that ; this is for a single display. Block coding with JavaScript editor: MakeCode

and: at Walmart, $5.88 a 5 volt battery pack , rechargeable with data / charging cable. Also, 400 tie hole bread board, jumper cables, variable resistor.
Рекомендации по теме
Комментарии
Автор

There are 3 pins on the potentiometer ; the "outside" pins are, either one to voltage and the other to ground. That leaves the middle pin for signal. In this case it is "analog read, from pin 0 called P0. You do not have to assign pin numbers for the output to the OLED because that is I2C and the SDA/SCL pin hookups take care of that. I tried to use alligator clips to connect to pin # 19 and 20. Fail. Clips are too wide so I had to buy the breakout board off E-Bay.

makecodeandhardware