I want to create a virtual keyboard by interfacing a Raspberry Pi with an Arduino and an ultrasonic sensor. The goal is to create a new architecture for computers that will be a whole system. The problem with Pis right now is you need a rather large keyboard to work them, this will make the system not only portable but get around that requirement. The keyboard will interface directly with a Rasparian desktop.
Components
1×
Arduino Uno
1×
Seeeduino Xiao
I needed something that would run the keyboard.h library and I stumbled on to the Xiao. It's under $5 and about the size of your thumb.
1×
Ultrasonic Distance Sensor - HC-SR04
1×
Micro USB (Male) to USB 2.0 (Female) Adapter, On-The-Go (OTG) Convertor Cable
I ran into a bit of a wall with the Arduino Uno. It turns out as much as it is easy to interface with the Pi Zero W it has the wrong chipset and won't allow me to run the Keyboard.h or Mouse.h libraries. A few nights ago I stumbled on to the Seeeduino Xiao which might have just made the project better. It is ultra small, inexpensive and comes equipped with the chipset I need. I will find out more when it comes in the mail.
A typical Arduino IDE has a serial monitor but the CLI doesn't have that option. After doing some digging I found I was able to mimic the monitor by way of a cat command. I hooked up the ultrasonic sensor and ran:
stty -F /dev/ttyUSB* 1000000 raw -clocal -echo
cat /dev/ttyUSB*
This allowed me to see in real-time what was going on with the sensor proving that they had interfaced properly. My next step is overlapping a keyboard with the sensor.
I am farther along in this project than I expected. Last night I interfaced my Pi Zero W to my Arduino Uno via the adapter and cable with no power supply problems. The board itself reads correctly on the Raspbarian desktop due to the installation of the Arduino CLI. There's no Arduino IDE available on the Pi Zero W but the CLI does the job.
It's very much the same idea. I saw that too ages ago and became fascinated with it. In theory, combining it it with a Pi should create a much much smaller working computer. Still trying to figure out the screen part though. In my head I'd like to make it a watch but the sensors and the Uno are too big for that.
I've seen a keyboard that projects an image of each key on a flat surface and then uses some kind of gesture detection to see which "keys" have been touched. Will this be something similar?
It's very much the same idea. I saw that too ages ago and became fascinated with it. In theory, combining it it with a Pi should create a much much smaller working computer. Still trying to figure out the screen part though. In my head I'd like to make it a watch but the sensors and the Uno are too big for that.