Laser Harp Project

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...

  1. 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?
  2. for midi output/controller aspect, do i just pretty much copy the link below?
    // http://itp.nyu.edu/physcomp/Labs/MIDIOutput#toc6
  3. and how do you choose proper bps speed for serial output? (i have no idea/ knowledge on these stuff)

thank you for your time and please answer my questions :slight_smile:

For the light sensor part of your question, here is a tutorial: How to use photocells, LDRs, CdS cells, photoresistors!

  1. 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.

  1. 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.