ArduinoCommander: android sensors
"Android sensors" advanced feature allows you to set pin PWM output value using device sensors.
You can choose available device sensor (accelerometer, gyroscope, light sensor, etc), configure values processing (filtering, accumulating, mapping) in order to use your phone or tablet like advanced remote Arduino shield.
With ArduinoCommander "android sensors" feature you can drive your robotic car, tank, quadrocopter or just blink LEDs using left-right-forward-backward movements, rotations and other gestures like in virtual games!
Tap the pin, select "Analog output (PWM)" radio button and tap "Advanced" button to display settings dialog.
First of all, you should choose device sensor from drop-down list, read sensor information including range and resolution below it's type. After that you should choose sensor output value from drop-down list (read it's description below it's name) and update rate. High update rate should be used with "value processing" option checked. Enable necessary modes to convert sensor values to arduino pin PWM values you need.
1. Time processing
Enable this option to select one value (min, max or average) in every period and type period (in milliseconds). It helps you to filter sensor invalid values and reduce possible noise and errors. This options is highly recommended to be used with high update rates or your UI will be slow.
2. Round sensors values
After the value is read from the sensor and processed by time processor, it can be rounded. Check this mode and select round mode from drop-down list.
3. Adjust values range
Finally, you should configure how to map sensor values to PWM values [0-255]. For this you should type two values which represent the whole sensor values range and according PWM values range. Click "Current" button to read current value from the sensor instead of typing. After that select two PWM values using seekbar.
Usage example (as on video above)
- upload modified StandardFirmata sketch to your arduino board (as describes here) and plug in your bluetooth arduino shield
- wire LED with ~200 Ohm resistor to one of PWM-available pins (for example, pin 3)
- launch ArduinoCommander application and connect to the board (select from the discovered bluetooth devices list)
- tap pin 3, select "Analog output (PWM)" radio button and tap "Advanced" button
- select "Accelerometer" sensor and "Z" sensor value from drop-down lists
- check "1. Time processing" checkbox with default settings
- check "3. Adjust values range" checkbox
- put device in vertical position and tap top"Current" button
- put device in horizontal position, screen up and tap bottom "Current" button
- tap "OK" button, rotate your device forward-backward and watch how LED lighting is changing
You can try this feature for 10 seconds after pin mode set or purchase and use without limitations.
PS. It's very comfortable to use this feature with "save and load pins configuration" feature.
© 2002-2013. Anetto Software.