Justin

Input devices

Goals

  • Make a PCB board and add input device
  • measure the analog levels and digital signals in an input device

For this week i decided to build a circuit which use phototransistor as the input.I used Niels Phototransistor circuit as my reference.

Phototransistor

Photo transistor is an electronic component which depends on the exposure to light to operate. A phototransistor will detect the light energy and convert it into digital electronic signals. It is capable of converting light energy into electric signals.



After the programming was done, i observed the board to that there is a connection missing

Programming the board

 
                #include 
                    SoftwareSerial mySerial(6, 2);
                    
                    // Pin Configurations
                    const int SENSOR = A3;
                    
                    int sensorValue = 0;
                    
                    
                    void setup() {
                      // declare the LED as an OUTPUT:
                      mySerial.begin(9600);
                      mySerial.println("I am here to serve.");
                    }
                    
                    void loop() {
                      sensorValue = analogRead(SENSOR);
                      mySerial.println(sensorValue);
                      delay(500);
                    }