Field type: sensor_stream
In the form designer, click + Add hidden field, then choose sensor_stream as the field type.
sensor_stream: capture a stream of sensor meta-data and save the results as a .csv file attached to each form submission.
To learn all about sensor meta-data, please see Experimental: Using sensor meta-data to enhance quality-control efforts.
To capture a sensor stream, add one or more of the following field types to your form:
- sensor_stream light_level - light level measured in lux, as reported by the device's ambient light sensor.
- sensor_stream movement - linear acceleration measured in m/s2, as reported by the device's linear acceleration sensor and gyroscope sensor.
- sensor_stream sound_level - sound level measured in dB, as calculated from the device microphone.
- sensor_stream sound_pitch - sound pitch measured in Hz, as calculated from the device microphone (estimated using the YIN algorithm and a window of 25ms).
- sensor_stream conversation - 1 when conversation seems to be happening vs. 0 when not, as estimated from the sound level, pitch, and/or raw data from the device microphone. This is the most-experimental – but also, potentially, the most-useful – type of sensor meta-data.
By default, all sensor streams capture data with a period or observation length of 1 second, so you will get roughly one observation recorded every second, while your form is being filled out. To set a different period length, put "period=#" in the field's appearance column, with the "#" replaced with the period length in seconds. If you want to record observations as fast as they come in from the underlying sensors, you can specify "period=0" (and then, e.g., you'll get roughly 25 observations/second from a sound-related sensor, but still a maximum of 1 observation/second for conversation streams).
Regardless of the period length you choose, sensor_stream data will be saved into an attached .csv file, with one file per submission. Each .csv file will then have a single row per observation. (See this help topic for more about the file format.)
In the spreadsheet form definition:
type | name | appearance |
sensor_stream light_level | fieldname | period=# |
sensor_stream movement | fieldname | period=# |
sensor_stream sound_level | fieldname | period=# |
sensor_stream sound_pitch | fieldname | period=# |
sensor_stream conversation | fieldname | period=# |