Datalogging Hat with FLORA BLE

Similar documents
'Sup Brows. Created by Kate Hartman. Last updated on :52:04 PM UTC

Adafruit IO Basics: Feeds

Sino:bit with Arduino

Adafruit IO Basics: Temperature & Humidity

Adafruit IO Basics: Analog Input

Adafruit IO Basics: Digital Input

TSL2561 Luminosity Sensor

Adafruit IO Basics: Digital Output

Desktop MQTT Client for Adafruit.io

Adafruit IO Basics: Color

Using Zapier with Adafruit IO

Adafruit Flora Bluefruit LE

Micro:bit with Arduino

Flora Wearable GPS. Created by Becky Stern. Last updated on :32:36 PM UTC

Make a Google Glass remote with Bluefruit

BLE Light Switch with Feather nrf52840 and Crickit

Interior Purse Light. Created by Becky Stern. Last updated on :41:08 PM UTC

Wind Blowing Emoji Prop

Sewable NeoPixels. Created by Becky Stern. Last updated on :50:14 PM EDT

Adafruit APDS9960 breakout

NeoPixie Dust Bag with Circuit Playground Express

Adafruit AM2320 Sensor

i2c/spi LCD Backpack Created by lady ada Last updated on :11:04 PM UTC

GPS Logging Dog Harness

Trellis 3D Printed Enclosure

Adafruit LED Sequins. Created by Becky Stern. Last updated on :02:00 AM UTC

Android GBoard Morse Code Control with Circuit Playground Express

Adafruit Color Sensors

Rx Snapchat Spectacles for DIY and STEM

Bluefruit LE Connect for ios

Adafruit IO Basics: ESP Arduino

Sino:bit with Arduino

Using IFTTT with Adafruit IO to Make an IoT Door Detector

Home Security Begins at the Front Door

Interactive Gift Box. Created by codingpro. Last updated on :47:40 AM UTC

Adafruit DRV2605 Haptic Controller Breakout

Adafruit VL53L0X Time of Flight Micro-LIDAR Distance Sensor Breakout

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Bluetooth Controlled NeoPixel Headphones

Sword & Wand Prop Effects with Circuit Playground

Adafruit IO Basics: Servo

PyPortal NeoPixel Color Picker Created by Kattni Rembor. Last updated on :42:41 PM UTC

Adafruit MPRLS Ported Pressure Sensor Breakout

Adafruit ATWINC1500 WiFi Breakout

MCP Bit DAC Tutorial

Getting Started with FLORA

Adafruit LED Sequins. Created by Becky Stern. Last updated on :00:06 PM EST

Phone-Activated Talking Dog Collar

NeoPixel LED Cortana Costume

GPS Dog Collar. Created by Becky Stern. Last updated on :30:40 PM UTC

Adafruit HUZZAH32 - ESP32 Feather

MCP Bit DAC Tutorial

Sparkle Skirt. Created by Becky Stern. Last updated on :48:58 PM UTC

Adafruit Si7021 Temperature + Humidity Sensor

Non-SAC Member Facility Higg Index Guide: Overview

Adafruit AS channel Visible Light Sensor

NeoPixel Ring Bangle Bracelet

3D Printed LED Buckle

MLX90393 Wide-Range 3-Axis Magnetometer

Introducing Circuit Playground

Pushrod Garage. Created by John Park. Last updated on :07:30 PM UTC

Alohamora Bottle. Created by Erin St Blaine. Last updated on :58:53 PM UTC

Con Badge with Circuit Playground Express

Adafruit MMA8451 Accelerometer Breakout

Trinket-Powered Conference Room Occupancy Display

Adafruit Capacitive Touch Sensor Breakouts

Adafruit GPIO Expander Bonnet for Raspberry Pi Created by Kattni Rembor. Last updated on :12:47 PM UTC

Introducing Adafruit Trellis

FLORA TV-B-Gone. Created by Becky Stern. Last updated on :32:57 PM UTC

Jawbone Icon Won't Enter Pairing Mode

NeoMatrix 8x8 Word Clock

Feather Weather Lamp. Created by Ruiz Brothers. Last updated on :54:26 PM UTC

Home Security Begins at the Front Door

Clockwork Goggles. Created by John Park. Last updated on :03:10 PM UTC

Video Doorbell Pro 1

Adafruit WINC1500 WiFi Shield for Arduino

Adafruit ATWINC1500 WiFi Breakout

Data Logging with Feather and CircuitPython

Light-Up Angler Fish Embroidery

Joy Featherwing. Created by Dean Miller. Last updated on :03:07 PM UTC

Monochrome OLED Breakouts

Snake Charmer Box. Created by Dano Wall. Last updated on :07:25 PM UTC

Adafruit CCS811 Air Quality Sensor

Getting Started with FLORA

Clare Video Doorbell Version 2 User Manual

The KWallet Handbook. George Staikos Lauri Watts Developer: George Staikos

Crawling Baby Sea Turtle Robot

Secret Hollow Book Intrusion Detector

Bunny Ears with MakeCode

1. Charging. 2. In-app Setup. 3. Physical Installation. 4. Features. 5. Troubleshooting. Home Security Begins at the Front Door.

Adafruit ATWINC1500 WiFi Breakout

Circuit Playground Express Laser Tag

Adafruit Si5351 Clock Generator Breakout

Luminous LED Flowers. Created by Becky Stern. Last updated on :47:44 PM UTC

Crickit Carnival Bumper Bot

Easy Sparkle Pocket T-Shirt

Adafruit 8x16 LED Matrix FeatherWing

Adafruit 8x16 LED Matrix FeatherWing

IS31FL x9 Charlieplexed PWM LED Driver

Ping Pong Ball Launcher

Transcription:

Datalogging Hat with FLORA BLE Created by Becky Stern Last updated on 2018-08-22 03:50:19 PM UTC

Guide Contents Guide Contents Overview Circuit and Arduino code Bluefruit LE Connect settings Adafruit IO Dashboard display 2 3 4 6 13 Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 2 of 17

Overview Log your wearables data to the cloud! Using the Bluefruit LE Connect app and Adafruit IO, you can display the changing values of a FLORA light sensor in realtime on a webpage. This is a great upgrade to make to your Sunscreen Reminder Hat (https://adafru.it/dnc) or Sparkle Skirt. (https://adafru.it/dn1) This guide focuses on getting your data from the Bluefruit LE Connect app to the Adafruit IO servers, so if you're a beginner with FLORA, try a few basic projects first! Here are some prerequisite guides to check out: Getting Started with FLORA (https://adafru.it/dwi) FLORA Bluefruit LE module (https://adafru.it/ioe) FLORA Lux Sensor (https://adafru.it/dna) (or FLORA Sensors (https://adafru.it/iof) if you want to swap to a different one) Adafruit IO Basics: Feeds (https://adafru.it/ioa) Adafruit IO Basics: Dashboards (https://adafru.it/f5m) For this example, you will need: FLORA microcontroller (https://adafru.it/dgx) FLORA Bluefruit LE Module (https://adafru.it/iob) FLORA Lux Sensor (https://adafru.it/dnb) Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 3 of 17

Circuit and Arduino code The FLORA, FLORA BLE module, and FLORA light sensor are wired up as pictured: Required Arduino libraries: Adafruit Unified Sensor Library (https://adafru.it/azm) Adafruit TSL2561 Light Sensor Library (https://adafru.it/az9) Adafruit Bluefruit LE nrf51 Library (https://adafru.it/f4v) Download and unzip the following file, then open up light-logging-hat.ino in your Arduino IDE: https://adafru.it/ioc https://adafru.it/ioc The main loop of the code reads the light sensor and sends the value out over the bluetooth connection: Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 4 of 17

void loop(void) { /* Get a new sensor event */ sensors_event_t event; tsl.getevent(&event); /* Display the results (light is measured in lux) */ if (event.light) { ble.println(event.light); } else { /* If event.light = 0 lux the sensor is probably saturated and no reliable data could be generated! */ Serial.println("Sensor overload"); } delay(1000); } Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 5 of 17

Bluefruit LE Connect settings Launch the Bluefruit LE Connect app on your Android or ios device. Below screenshots are from an Android phone, ios app may vary slightly. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 6 of 17

A list of available bluetooth devices will appear. Select the one labeled Adafruit Bluefruit LE. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 7 of 17

A prompt appears asking you to choose a mode to connect-- select UART mode. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 8 of 17

If your connection is successful, you should see sensor values update on the screen. If your connection failed, try restarting both the FLORA circuit and the Bluefruit LE app and attempt to connect again. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 9 of 17

Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 10 of 17

Configure your first two boxes as follows: Server Address: io.adafruit.com Port: 1833 Publish UART RX: username/feeds/feedname Under "Advanced," enter your username and AIO key, which can be found by clicking the key button in the upper right of any of your Dashboards. Copy your AIO key into an email, file on dropbox, or other easy way to paste it into your device-- copying it from the screen is no fun (unless you love memorizing)! After you've configured your settings, go ahead and click ENABLE at the top of the page. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 11 of 17

If the connection isn't successful, double check your settings including your username, UART/RX path, and AIO key. If you're connected, you can now refresh your Feeds page on io.adafruit.com to see your new data steam. Hurray! Now let's learn how to display that incoming data. Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 12 of 17

Adafruit IO Dashboard display Once the Bluefruit LE Connect application is sending data to Adafruit IO then you're ready to build a dashboard to display the results. I you're new to using Adafruit IO be sure to first read the Adafriot IO Basics: Dashboards (https://adafru.it/ioe) guide for an overview of creating a dashboard. To create the dashboard for the light sensor feed first log in to Adafruit IO (https://adafru.it/ez8) (https://io.adafruit.com (https://adafru.it/ez8)) and click the My Dashboards button in the upper left: Once on the Your Dashboards page click the Create Dashboard button in the upper right to build a new dashboard: In the dialog box that pops up give the dashboard a good name, like Hat Light, then click Create Dashboard: Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 13 of 17

Now the new Hat Light dashboard is displayed, but it doesn't have any blocks that show sensor data. You can add a line chart block to see the light sensor value over time by clicking the New Block button in the upper right corner: Scroll down to the line chart component and click Create: Now find the hatlight feed that was created by the Bluefruit LE Connect application. You can scroll through the feed Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 14 of 17

list or type in the name to the search box. Once you find the feed click the Choose button next to it, then click Next Step: Finally make the block easy to understand by filling in details about how it should be displayed: Block Title: Put in a descriptive title for the block, like Hat Light Graph. Hours of History: Stick with the default of 1 hour, or change to a larger/smaller range. X-Axis Label: Stick with the default Time since the X axis (left to right axis of the graph) is based on the time of each sensor reading. Y-Axis Label: Label this axis (top to bottom axis) Lux since it's the axis for the light sensor reading. Y-Axis Minimum: Use a value like 0 as a good minimum range for the graph values (since you know there are no negative lux values). Y-Axis Maximum: Use a large value like 2000 as a starting point, you can always edit the block and change this later to 'zoom in' on a range of data. Once you've filled in the details click Create Block: Awesome, the chart block should now be displayed! Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 15 of 17

You can change the size, location, and details of the chart block by clicking the Edit button in the top left: Once you're in edit mode you can move the mouse over a block to make changes to it: To change the block's settings click the gear icon in the upper right of the block. To delete the block click the trash can icon in the upper right of the block. To move the block click and drag it anywhere on the dashboard. To resize the block click and hold the resize arrows in the lower right of the block as shown below: Adafruit Industries https://learn.adafruit.com/datalogging-hat-with-flora-ble Page 16 of 17

Drag the mouse while holding the resize arrows to change the size of the chart block. Once you're done editing blocks be sure to click Done Editing to save the changes! Let your creativity flow as you design cool dashboards to display sensor data! For example here's what you can do if you change the size of the chart and add a gauge block next to it (remember click New Block to add a new block, then follow the steps for customizing it): Adafruit Industries Last Updated: 2018-08-22 03:50:14 PM UTC Page 17 of 17