Connecting Grove Sensors to Galileo Board
1. We have used Grove Starter Kit Plus - Intel® IoT Edition:http://www.seeedstudio.com/depot/Grove-starter-kit...
2. Understand the Grove shield and sensor in more detail:http://www.seeedstudio.com/wiki/Grove_-_Starter_Ki...
3. One important thing to understand when connecting a sensor to the Grove Base Shield and the sensors: There are two types of sensors: Analog and Digital. Depending on this, the sensor needs to be connected to the Analog or the Digital pin. If you connect the sensor to the wring ping, the program won't complain, and you will get results back from the sensor as well. But the result won't be accurate. Hence, you need to very careful about connecting the right sensor to the right pin.
4. Reading from the sensors and Writing to the sensors: Arduino Wiring and the Intel XDK SDKs have made writing code for these very simplified. You need just one line of code to do reading and writing. But doing this in the proper way can be tricky.
Reading and writing the sensor values - With sensors we are monitoring the motion. That means, we are reading/writing the sensor values at regular intervals. Setting this interval of reading/writing is tricky.
Reading - If you set the interval too short, for reading some values will be captured by your program, but not all. This is because, the speed the reading loop in the program is much higher than the physical capacity of the sensor to read environment parameter (temperature, motion, sound, etc.). But, skipping one or two values won't affect your program logic much. Hence, you won't even understand this is happening.
Writing - But when you are trying to write to an output device (buzzer, LED, etc.), if the interval is too short and you are running a code toggling the value (ON in one round, OFF in the second) to be written, the device may not behave properly. This is because of the hardware speed limitation. By the time the device, say buzzer, get the command of on turning ON, before even it triggers the physical sounds, the OFF command reaches it. Hence, you may need to do some trial and error to set the interval here.
No comments:
Post a Comment