In this lesson we learn how to incorporate a push button switch into our Jetson Nano projects. We explain the concept of a pull up resistor, and show how to configure the GPIO pins as inputs. This will allow you to take your NVIDIA Jetson Nano projects to new heights. Enjoy!
Tag Archives: Push Button
Arduino Tutorial 34: Simplest Way to Use a Pushbutton Switch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
int buttonPin=2; int buttonValue; int dt=100; void setup() { // put your setup code here, to run once: pinMode(buttonPin,INPUT); digitalWrite(buttonPin,HIGH); Serial.begin(9600); } void loop() { buttonValue=digitalRead(buttonPin); Serial.print("Your Button is: "); Serial.println(buttonValue); delay(dt); } |