Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Sensors for clue #289

Merged
merged 59 commits into from
Apr 6, 2020
Merged

Sensors for clue #289

merged 59 commits into from
Apr 6, 2020

Conversation

xnkevinnguyen
Copy link
Contributor

@xnkevinnguyen xnkevinnguyen commented Apr 1, 2020

Description:

Make all the sensors for clue.
AB#34292
AB#34296
AB#34297
List of sensors: Temperature, Light accelerometer, Leds, push_button, gpio, speaker, sound , pressure, humidity, gesture, proximity

Type of change

Testing Steps

  1. Run the code to display sensor values
from adafruit_bitmap_font import bitmap_font
from adafruit_clue import clue

clue_data = clue.simple_text_display(text_scale=2)

while True:
    clue_data[0].text = "Acceleration: {:.2f} {:.2f} {:.2f} m/s^2".format(
        *clue.acceleration
    )
    clue_data[1].text = "Pressure: {:.3f} hPa".format(clue.pressure)
    clue_data[2].text = "Altitude: {:.1f} m".format(clue.altitude)
    clue_data[3].text = "Temperature: {:.1f} C".format(clue.temperature)
    clue_data[4].text = "Humidity: {:.1f} %".format(clue.humidity)
    clue_data[5].text = "Proximity: {}".format(clue.proximity)
    clue_data[6].text = "Gesture: {}".format(clue.gesture)
    clue_data[7].text = "Color: R: {} G: {} B: {} C: {}".format(*clue.color)
    clue_data[8].text = "Button A: {}".format(clue.button_a)
    clue_data[9].text = "Button B: {}".format(clue.button_b)

    clue_data.show()
  1. Modify sensors with Value to display the values on the clue screen. Gesture should return an integer depending on it's mapped value (ex: UP=1)

Copy link

@nasadigital nasadigital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you both for addressing the comments!

Copy link
Contributor

@vandyliu vandyliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some suggestions for the descriptions but other than that it LGTM!

xnkevinnguyen and others added 9 commits April 6, 2020 13:13
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
Co-Authored-By: Vandy Liu <33995460+vandyliu@users.noreply.github.com>
@xnkevinnguyen
Copy link
Contributor Author

@vandyliu Thanks for your text suggestions. They were all applied!!! :)

Copy link
Contributor

@vandyliu vandyliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP ITTTTT

Copy link
Contributor

@andreamah andreamah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work on all ends!!! 🤩

src/clue/adafruit_clue.py Outdated Show resolved Hide resolved
src/clue/adafruit_clue.py Outdated Show resolved Hide resolved
src/clue/adafruit_clue.py Outdated Show resolved Hide resolved
@xnkevinnguyen xnkevinnguyen merged commit 79f42a0 into dev Apr 6, 2020
@vandyliu vandyliu deleted the users/t-xunguy/clue-sensors branch April 6, 2020 21:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants