Go Down

Topic: Creating a program that use input and output.  (Read 157 times) previous topic - next topic

Cjm4280

Hello!

I am trying to create a program that would use an input function to generate output function. For example. I have the LCD set up. I would now like to use a keyboard to make type texts functions and have it displayed onto the LCD.

For example.

I type A on the keyboard. It shows up as A on the LCD.

I know how to use the LCD functions on the program. But using a responsive interaction is what I am struggling on. Since I have no idea where to start.  

leepalmer

just off the top of my head, how about a sound sensor? type 'sound sensor arduino' in amazon. you would read the analog value off the sensor, matching the value (most likely value range) for each note played. then map the value to the notes letter and print it.

Cjm4280

just off the top of my head, how about a sound sensor? type 'sound sensor arduino' in amazon. you would read the analog value off the sensor, matching the value (most likely value range) for each note played. then map the value to the notes letter and print it.
So is it possible to do that with just a Arduino Uno?

leepalmer

if you mean just an uno with no sensor then no.

well maybe ... there would have to be a way to connect your keyboard directly to the uno. on the uno side it's easy. just use a pin - or pins. btw, use the analog pins A0-A5 or the pins that have a "~". but where do you come off of the keyboard? the speaker? maybe? if so, then you could analog read the speaker the same way you would read the sensor.

be VERY, VERY careful. the uno will not take any more than 5v's on any pin. before you even consider this, hookup a multimeter to your speaker - or whatever it is you decide to use off the keyboard. make absolutely sure that for any given note at whatever volume, you do not exceed 5v's. i'd have different sizes of resisters on hand. you'll probably need them to insure the max volts is not exceeded. btw, the due is 3.3v max. this test will also let you know if this approach is even feasible. that is, if the meter doesn't change values, end of test. won't work.

this, of course, will take a bit of experimentation, but it could be a fun project to play with.

over and out ...

sterretje

just off the top of my head, how about a sound sensor? type 'sound sensor arduino' in amazon. you would read the analog value off the sensor, matching the value (most likely value range) for each note played. then map the value to the notes letter and print it.
How does sound sensor relate to keyboard?

Maybe op should be clearer; keyboard as in e.g. electronic piano or keyboard as in e.g. computer keyboard?

If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

ZinggJM

Could it be you mean by keyboard an ordinary USB keyboard? I have no experience with this, but my Arduino IDE has a Keyboard library (pre-) installed. In Library Manager I filtered for "HID" to find it (human interface device). Then look for an example for this library.

Jean-Marc

Go Up