Automatic Object Detection with your NeuroMaker Hand
Allow your NeuroMaker hand to detect an object near it and automatically perform gestures. For example, you can place the sensor on the palm so it automatically shakes your hand when you approach with your hand. Learn how to use breadboards, sensors, and basic circuits. Code C++ in Arduino IDE to power the sensors, get input and output, visualize serial input and create your own gestures and applications.
Number of People
1- 2 students per NeuroMaker Hand Kit
- One fully build NeuroMaker Hand
- (Included in the kit) UNO programming board
- USB cable (Included in the kit)
- Jumper cables and bread board (Included in the kit)
- HC-SR04 ultrasonic distance sensor (Not included)
Necessary Program Files
Pre Check Items
- Completion of “Build your first C++ program” project
- The NeuroMaker Hand is fully built
- Both 9V and AA batteries are installed
- A Mac/Windows computer with network access and USB port
- Arduino IDE is installed
C++ is one of the most popular programming languages in use around the world today. Much of the code that runs your internet browser and popular online games like World of Warcraft use C++ to run their systems! C++ requires less resources to operate than other higher level languages like Python. In the world of Biomedical sciences, C++ is used from everything to power MRI machines to systems that handle patient information. At BrainRobotics, much of the code used to control the movement of the device itself is actually written in C++!
Connect the ultrasonic sensor to the blue power chip in the NeuroMaker Hand using breadboard and jumper wires.
Below is a list of connections:
|Pins on the ultrasonic sensor||Sockets on the blue power chip|
Below is the instruction for the code.
You have already learned in the previous C++ project that we need libraries at the start to import some important pre-built code:
Complete This C++ Code!
Serial Data Display
Your serial monitor will display sensor data as the image to the right.
Upload Your Code
After the code is done, it’s time to start uploading. Use the USB to connect the NeuroMaker hand with your computer. In the Arduino IDE, go to “Tools” and choose the port connected to your hand as shown below. The port # might be different on your device.
Choose board as Arduino Uno as shown.
Run Your Code
Click the upload button shown in yellow to upload your program to the NeuroMaker Hand.
How did your code work? Could you create the right motor angles to display different hand signals? What other logic could you add to make your program work more efficiently? For hints, view Sensor_Answer.ino