This is my interactive emoji lamp, and the control of this is based on infrared detection. It means that you can put your hand on the left of the lamp to make it turn right and meanwhile an emoji symbol will display on the oled monitor. What is more, you can put your hand on the top of the lamp to switch on/off it. Now let me show you how to make it out.
Seeed Studio beaglebone green wirelss *1
Grove - Line Finder *3
Grove - OLED Display*1
Grove - Variable Color LED*1
Grove Base Cape for Beaglebone v2*1
My robotic arm is assembled so I just need to fix all the Grove module on the robotic arm as the following picture.
Then I connect 3 Grove - Line Finder to Gpio_50, Gpio_115 and Gpio_117 on the Grove Base Cape. And Grove -OLED Display is linked to the I2C_2 port on the cape, while Grove - Variable Color LED is inserted to Gpio_51 port. Besides, there are 4 servos pre-installed in the robotic arm, but I only use two of them to control the robotic arm left-right and up-down. These two servos are connected to P8_13 and P8_19. The last thing is don’t forget to power the servos with a 5V power, because BBGW can’t provide enough current to all these module.
After finishing the connection, now we can download the code from GitHub. Make sure your BBGW can access the Internet and enter the following command:
git clone https://github.com/jerryyip/interactive_lamp_with_emoji
Then you can try to run the script for testing:
sudo python app.py
If the interactive emoji lamp don’t work well, please confirm the wiring , or edit the program as you need.
In oled.py ,you will see 4 list,which contain many hex number. That is the data of the emoji. So ,if you are going to add the emoji you like to the program, you need to make the hex data of it. Here are the tools and some guide to make it: