Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      <a class="navbar-brand" href="#">Marni Duffy</a>

    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
        <li><a href="" target="_blank">Site/Resume</a></li>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->

<div class="container col-sm-10">
  <div class="row">
    <div class="col-sm-10 col-sm-offset-2 text-center">
        <div id="chartContainer" style="height: 460px;"></div>
<div class="container">
  <div class="row">
    <div class="col-sm-6 col-sm-offset-3 text-center text">
      <h3>Greenhouse Project</h3>
  <p>I built this greenhouse project out of a need on my <a href="" target="_blank">small farm</a>. I have an unheated greenhouse and I wanted to see how the temperature in the greenhouse fluctuated overnight. I wanted to see if the greenhouse mats that my partner made would actually keep the soil temperature of my seeding trays warmer than the ambient and outdoor temperatures.</p>
  <p>I created a Raspberry Pi temperature sensor and created a script that runs constantly on the Pi. It first checks for WiFi connection. If it is connected, it takes a temperature reading from the sensor, converts it to Fahrenheit, and sends the datetime and temperature to a Firebase database. This chart shows that temperature, and a black dot indicating the current outdoor temperature. If the Pi is not connected to wifi, it waits and attempts reconnection in a minute.</p>

<div class="row photos ">
  <div class="col-sm-6 col-sm-offset-3 text-center">
    <h3 class="text">Video of the sensor in the greenhouse:</h3>
    <a data-flickr-embed="true" data-context="true"  href="" title="Raspberry Pi WiFi Greenhouse Temperature Sensor"><img src="" width="404" height="720" alt="Raspberry Pi WiFi Greenhouse Temperature Sensor"></a><script async src="//" charset="utf-8"></script>



                $blue: #2176AE;
$lightgreen: #A9E5BB;
$lightyellow: #FCFCDD;
$pinkcoral: #FF5E83;
$darkblue: #03254E;

#chartContainer {
  margin-bottom: 30px; 
body {
  background-image: linear-gradient(to bottom, rgba($lightyellow,0.5) 0%,rgba($darkblue,0.5) 100%), url("");
  background-repeat: no-repeat; 
  background-position: bottom;
.text {
  border: 2px solid $darkblue;
  border-radius: 5px; 
  background-color: rgba($darkblue, 0.75); 
  padding: 20px; 
  color: $lightyellow;
  a {
    color: $pinkcoral; 


                var config = {
  databaseURL: "",
  storageBucket: ""


var dataPoints = [];
var dataPoints2 = [];

var chart = new CanvasJS.Chart("chartContainer", {
  animationEnabled: false,
  theme: "light2",
  title: {
    fontColor: '#03254E'
  toolTip: {
    content: "{name}: {y}°F"
  axisY: {
    minimum: 20,
    maximum: 110,
    title: "Temperature",
    titleFontColor: '#2176AE',
    titleFontSize: 24,
    labelFontColor: '#03254E',
    fontFamily: "'Patrick Hand SC', cursive"
  axisX: {
    title: "Time",
    titleFontSize: 24,
    titleFontColor: '#2176AE',
    valueFormatString: "hh TT",
    labelFontColor: '#03254E', 
    fontFamily: "'Patrick Hand SC', cursive"
  data: [
    xValueType: "dateTime",
    type: "line",
    dataPoints: dataPoints, 
    name: "Greenhouse Temperature",
    color: "#FF5E83"

var database = firebase.database().ref('/Greenhouse1/temperature');

database.on('value', function(snapshot) {

function addData(data) {  
    const temperatureHere = roundTemp(data[e]["value"]);
    if(temperatureHere != 185) {
        {x: (data[e]["timestamp"]*1000), y: +temperatureHere}

function loadLocation() {  
    var lat = 42.916148;
    var lon = -76.647153;
    var weatherAPI = "" + lat + "&lon=" + lon + "&units=imperial&appid=f7e61ec2dc9fb713acdef2c3386e3372";   
  $.getJSON(weatherAPI, function(weather) {
    var temp = weather.main.temp;
    var dateTime =;
    dataPoints2.push({x: dateTime, y: temp});

function roundTemp(temp){
  return temp.toFixed(2);