Things used in this project

Hardware components:
Watch%20single
O Watch Sensor Kit
×1
Software apps and online services:
Ide web
Arduino IDE

Code

Humidity Sensor Demo for O Watch Sensor KitArduino
/*
 * This is a demo of the SI7021 Humidity Sensor
 * This demo is made for the O Watch kit - http://theowatch.com
 * 
 * This demo is based on the SI7021 library example
 * and uses by Marcus Sorensen <marcus@electron14.com>
 * https://github.com/mlsorensen/SI7021/blob/master/SI7021.h
 * licensed under the GNU GPL v2
 * 
 */

#include <TinyScreen.h>
#include <SI7021.h> //include the sensor library

SI7021 sensor; //declare the sensor
TinyScreen display = TinyScreen(TinyScreenPlus);

void setup(void) {
  Wire.begin();
  sensor.begin();
  display.begin();
  display.setFlip(1);
  display.on();
  display.setFont(liberationSans_10ptFontInfo);
}

void loop() 
{
  //get the temperature using the library function 
  //temperature is an integer in hundredths
  int tempHundredths = sensor.getCelsiusHundredths();
  float temperature = tempHundredths / 100.0;

  //get humidity from the libdary function
  // humidity is an integer representing percent
  int humidityvalue = sensor.getHumidityPercent();

  display.setCursor(5,5);
  display.print("Sensor Demo");
    
  //print humidity valye
  display.setCursor(5,25);
  display.print("Humidity: ");
  display.print(humidityvalue);
  display.print("%  ");
  
  //print temperature value
  display.setCursor(5,40);
  display.print("Temp: ");
  display.print((temperature*9/5+32-13)); //printing value converted to Fahrenheit
  display.print(" F  ");
  delay(2000);
}

Credits

Owatchlogofebsmall
O Watch

Make your own smartwatch. Learn 3D design and Arduino coding.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Word Clock on the O-Watch
Easy
  • 554
  • 9

Protip

We'll build on the Simple RTC Watch to turn our O-Watch into a Mini Word Clock, which uses an 8 x 8 grid of letters to spell out the time.

Animated Word Clock on the O-Watch
Easy
  • 439
  • 6

A modified version of J Koger's Mini Word Clock for O-Watch, now with an animated digital rain effect.

Getting Started with O Watch
Easy
  • 525
  • 8

Full instructions

Assemble the O Watch, configure the Arduino IDE and load your first program.

2048 Sliding Tile Game for the O Watch
Easy
  • 277
  • 5

Full instructions

This is a sliding tile game for the O Watch based on the simple and addicting game 2048 by Gabriele Cirulli.

Googly Eye O-Watch
Easy
  • 123
  • 3

Protip

Inspired by Mike Mak's Eye Clock, now the O-Watch can show the time with two googly eyes: hours (left eye) and minutes (right eye).

Simple Watch Using RTC
Easy
  • 1,151
  • 4

Full instructions

The O-Watch Simple Watch code tweaked to use the Arduino Zero's built-in RTC, plus a couple other tweaks.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login