Тёмный

Potentiometer - Analog Input for the Raspberry Pi 4 

Robotica DIY
Подписаться 5 тыс.
Просмотров 12 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@junpak9234
@junpak9234 3 года назад
Hey great vid. One question. How many potentiometers can I use with just one of those mcp3008. Thanks
@Wythaneye
@Wythaneye 2 года назад
Came for the nerdy details. Stayed for the most excellent background music.
@Mandy-vp6nv
@Mandy-vp6nv Год назад
hello, can i control with the potentiometer as well a Knob in a Software Synth like Qsynth ?
@ianmacnz9045
@ianmacnz9045 4 года назад
Hi, Great video. My question, I would like to control two LEDS independently using two potentiometers, with a raspberry pi. Would I need two MCP3008 ICs or can it be done in a single MCP3008? Also how would you amend your code for this project to achieve this? Thank you
@RoboticaDIY
@RoboticaDIY 4 года назад
You can add 8 potentiometer in single MCP3008. I wrote code for you. But i didn't tested it. I know it will work. Please let me know it is working perfectly or not. from gpiozero import PWMLED, MCP3008 from time import sleep pot1 = MCP3008(0) pot2 = MCP3008(1) led1 = PWMLED(17) led2 = PWMLED(18) while True: if (pot1.value < 0.002): led1.value = 0 else: led1.value = pot1.value if (pot2.value < 0.002): led2.value = 0 else: led2.value = pot2.value print(pot1.value) print(pot2.value) sleep(0.01)
@ianmacnz9045
@ianmacnz9045 4 года назад
@@RoboticaDIY Thank you - I will try it out. Will it work on all Pi versions? Thank you
@RoboticaDIY
@RoboticaDIY 4 года назад
@@ianmacnz9045 Yes it will work.
@msaeedanwar9495
@msaeedanwar9495 4 года назад
Can you make a vedio on automatic school bell. On which we can set at least 10diffrent times for periods. And bell rang after each period.
@RoboticaDIY
@RoboticaDIY 4 года назад
I will try to make it next week.
@umairsayyed7644
@umairsayyed7644 4 года назад
Nice
@KrazyKrazenHDGaming
@KrazyKrazenHDGaming 4 года назад
I did this exact setup and code, but whenever I ran the program I only got 0.0004885... and it wouldn't change. Any ideas of what's wrong?
@RoboticaDIY
@RoboticaDIY 4 года назад
May be your potentiometer is not connected properly. change wires of potentiometer or check voltage with multimeter by rotating knob. if it's still near to zero. means potentiometer is not working.
Далее
DIY Pump Solutions
00:18
Просмотров 1,6 млн
Наши дети захватили кухню!
00:59
Просмотров 349 тыс.
Raspberry Pi Automation #1: Mains Relay HAT
15:03
Просмотров 273 тыс.
Raspberry Pi Zero W Surveillance Camera
17:53
Просмотров 535 тыс.
Raspberry Pi 4 As A Web Server [Make Own Website]
6:31