Hello I'm pretty much a noob in arduino and currently I am working on laser harp project for my high school's ap computer science class. Though I only programmed in java, I'm pretty friendly with C and got pretty used to arduino language but I really need help with programming all the photoresistor value and midi output for the laser harp. I have several questions...
Is it possible to use digital pin and get HIGH or LOW boolean from the sensor? if i use voltage divider to do so, how do you do that?
Is it possible to use digital pin and get HIGH or LOW boolean from the sensor? if i use voltage divider to do so, how do you do that?
Digital pins ARE for reading HIGH/LOW from digital sensors.
Analog pins are for reading varying voltage, where a voltage divider would be used to get the input voltage into a range that the Arduino can handle.
and how do you choose proper bps speed for serial output?
The serial output speed is chosen to match the speed of the device on the other end,
Digital pins ARE for reading HIGH/LOW from digital sensors.
Analog pins are for reading varying voltage, where a voltage divider would be used to get the input voltage into a range that the Arduino can handle.
I know digital pins are for high/low values. if you actually red my question, i was asking HOW to code and get a boolean value with ldr.
You could/should use a comparator. If you don't want to use one, put a potentiometer in series with the LDR, and adjust it until the digital pin triggers at the requisite amount of light. Phototransistors are much better for this, though.