Skip to content

13. Input devices

A week with, of course, a lecture by Neil after watching dozens of machines built all over the world for last weeks’ assignment, and a class by Erwin on inputdevices. Not all of it I could appropriate, but the gist I got I think.

Groupassignment

We were to measure an inputdevice, and I joined Jonathan and Paola, them seemingly knowing better which instruments to use and how. We chose the sonar, and tried to connect it to Jonathans old hello world board. That did not give the response we hoped for, so we switched to an Arduino.

Figuring out how to connect and then read out the Logic analyzer was not very easy: we had to watch a tutorial on the tool, and still then did not manage to get a meaningful reading. The Arduino IDE did give back a reading - passing your hand over the sonar proved it worked, better then the analyzer we picked. The other analyzer was easier to set up, and gave a reading easier to interpret. I personally wondered what the extra benefit is of analyzing your setup if the IDE tells you it is in motion - I do not fully grasp yet how to use the information obtained there. But I got inspired to actually go do something myself instead of carefully watching my peers, so I decided it would be wise to go home and get myself better acquainted with the Arduino I bought myself. Learning by doing, that is. So I did.

sonar

ms

programme

ms2

ms3

ms4

ms5

salae

    Individual assignment

Because of time I decided to use my old Hello World board, and try and programme the optical sensor that I put on it - it had not been used as of yet.

First I looked for an Arduino sketch online, and found one that looked not too complicated Linking where I am now in the Fabacademy to where I was a few weeks ago took quite an effort, so obviously I made a lot of mistakes. Henk helped me out several times luckily, mainly by pointing towards areas that I could troubleshoot next. My programme did not work, and that was because I did not select the right pin (totally forgot about that). I looked things up in my Kicad schematic, and was able to find the correct one to assign it to. Still no luck, so then there were all the variables of maybe faulty board, maybe faulty usbhub, maybe faulty led, maybe faulty sensor - I tend to doubt everything. Along the way I tested everything - a first time for using the multmeter independently (on the led), and even though I heard the sound of frying electronics (maybe my imagination?) it lit up. This helped Then I tried the board again, still no dice, and upon inspection found one of the resistors was missing. I had to rediscover which one I used in the original design, and soldered that back onto the board. Which went flawlessly… Then back to the programmingtable, and tried out the Arduino code I linked to. Still not really doing what I wanted, but then I tweaked the input (making the numbers much smaller) and again cheking the serial monitor in the Arduino IDE I saw it registered the difference between a finger covering the sensor and open sensor. Called Dim and Dark here, like a dumb cartoonduo :)

Finished something that I was anxious about. I am happy it worked…

code


Last update: July 7, 2022