In this video I show how to use both cores on the Raspberry Pi Pico W. We will explore an example using threading where we will operate 2 LED and a servo.
In this video lesson, we show how to create a dimmable LED on the raspberry pi using a potentiometer. Below is the schematic of the circuit we will be using.
Then we used the following code to read values through the ADC0834 analog to digital chip, and then apply a PWM signal to control the brightness of the LED.
In this video lesson, we show how to control an LED using python. Python sends commands to arduino, which then controls the LED. We also create a vPython visual, where the ‘Virtual’ LED mimics the behavior of the real LED. This a really cool demonstration and hope you enjoy it. I include below the code we develop in the video. On the arduino side we end up with the following:
Arduino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
intredPin=11;
intgreenPin=10;
intbluePin=9;
intredVal=255;
intgreenVal=255;
intblueVal=255;
Stringcmd;
voidsetup(){
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(redPin,OUTPUT);
pinMode(greenPin,OUTPUT);
pinMode(bluePin,OUTPUT);
}
voidloop(){
// put your main code here, to run repeatedly:
while(Serial.available()==0){
}
redVal=Serial.readStringUntil(':').toInt();
greenVal=Serial.readStringUntil(':').toInt();
blueVal=Serial.readStringUntil('\r').toInt();
analogWrite(redPin,redVal);
analogWrite(greenPin,greenVal);
analogWrite(bluePin,blueVal);
}
And on the python side we have:
Python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
importserial
fromvpython import*
arduinoData=serial.Serial('com3',115200)
myOrb=sphere(color=color.black,radius=1)
whileTrue:
myCmd=input('Please Input Your Color R:G:B 0-255 ')
In this lesson we show you how to control a simple LED circuit using the GPIO pins on the Jetson Nano. We use pull up resistors to connect a push button to the Jetson Nano GPIO pins. We create a toggle switch where the light turns off when the button is pressed, and then turns it back on when pressed again.
In this lesson we show how to interact with the GPIO pins on the NVIDIA Jetson Nano. The GPIO pins on the Jetson Nano have very limited current capability, so you must learn to use a PN2222 BJT transistor in order to control things like LED or other components. In this lesson we show how the Jetson Nano can be used to control a standard LED.
Making The World a Better Place One High Tech Project at a Time. Enjoy!