Xiaohan’s Arduino Homework 2

Digital Input

Serial Monitor

Analog Input

Arduino sketch [two buttons control one LED (on and off)]

const int  buttonPin1 = 2;    // the number of the pushbutton pin
const int  buttonPin2 = -3;
const int ledPin1 = 13;       //  the number of the LED pin

void setup() {
  pinMode(buttonPin1, INPUT);
  pinMode(ledPin1, OUTPUT);

void loop() {
  // read the state of the pushbutton value:
    buttonState = digitalRead(buttonPin);
   if ((digitalRead(buttonPin1) == HIGH) && (digitalRead(buttonPin2) == LOW)) {

   if ((digitalRead(buttonPin1) == LOW) && (digitalRead(buttonPin2)) == HIGH) {

Hello, I am Xiaohan Miao

Hello, I am Xiaohan. I am from China. I had my bachelor degree in Metals and Jewelry. I did a lot of hand-crafted projects in the past. Nowadays, digital is becoming more and more popular and important in peoples’ life. I am really interested combining my work with electronics and coding. I like to go to karaoke and play board games in my spare time. Looking forward to work with you all in the future. I bleached my hair recently so now my hair looks slightly grey-ish and yellow-ish.