How to attach rechargeable battery to PiStorms
Latest posts
-
How to attach rechargeable battery to PiStorms
-
Connect to Wi-Fi Directly from PiStorms!12/02/2017
Connect your Raspberry Pi to a Wi-Fi network directly from PiStorms!
-
Image Recognition Robot with PiStorms and Pi Camera12/02/2017
Image Recognition Robot with PiStorms and Pi Camera
-
-
Rotary Inverted Pendulum with PF-XL Motor and GlideWheel-M12/13/2016
Rotary Inverted Pendulum with PF-XL Motor and GlideWheel-M
-
-
Make Your Own Obstacle Avoidance Robot with SumoEyes12/13/2016
Make Your Own Obstacle Avoidance Robot with SumoEyes
-
-
Check Basic Information of Your I2C Sensors12/13/2016
Check Basic Information of Your I2C Sensors
-
Blog categories
Search in blog

Intruder Alert! ...Or, Welcome?
The mindsensors Grove Sensor Adapter makes it easy to use a variety of unique Grove sensors with the EV3. Our custom block makes it easy to read the sensor from your program. Here is an example of using it with the Grove motion sensor.
The Grove motion sensor is a very cool device with a wide range of applications. You can use it to trigger an intruder alert! Or you could have a robot say "hi" and wave when it sees someone. We'll take the more friendly approach today.
To start off this project our robot is simply a mount for the EV3 with the Grove Sensor Adapter connected to port 1, and the PIR Motion Sensor connected to that. Here is a simple program that will play a sound when it sees someone.
To make things more interesting, we can add a Display block to show our helpful fairy friend on-screen. With just one more block we could also light an LED when someone is detected, using another Grove Sensor Adapter and the LED Socket Kit.
A bit more will let us add an animation to show the character flapping up and down. Here we add a loop that runs alongside the sounds. The loop will draw the image with a y of -3, wait half a second, then do the same with y = 3. Because the Clean Screen input is set to True, the image will appear to bob up and down. At the same time, the sounds will play, then wait an additional three seconds. Once that finishes we use a Loop Interrupt block. Notice how the animation loop is set to run Unlimited? Three seconds after the sounds play, this will stop the loop. You can name loops by clicking the "01" label at the top. Finally, the screen will be reset once the animation finishes.
We hope you enjoyed this idea for a project. There are so many more robots possible with the Grove PIR Motion Sensor and mindsensors.com Grove Sensor Adapter. Look at the main blog page to contact us and submit your own project!
Related posts
-
Line Following Robot with LightSensorArray or LineLeader
Line Following Robot with LightSensorArray or LineLeaderread more -
Attach Mulitple Sensors to a Single EV3 Port
EV3 Sensor Adapter with SPLIT-Nxread more -
Line Tracking Experiments with NXTCam
Posted in: NXT & EV312/02/2015Line Tracking Experiments with NXTCamread more -
Vision for your PiStorms Robot using Pi Camera!
Vision for your PiStorms Robot using Pi Camera!read more -
How to install OpenCV on Raspberry Pi and do Face Tracking
How to install OpenCV on Raspberry Pi and do Face Trackingread more
Leave a comment