This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set which pin each strand of lights is connected to | |
int lightStrand1 = A4; | |
int lightStrand2 = 3; | |
// Runs once | |
void setup() { | |
// Set strands as outputs | |
pinMode(lightStrand1, OUTPUT); | |
pinMode(lightStrand2, OUTPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 1 // Change to 1 to enable this code (must enable ONE user*.cpp only!) | |
#include <Adafruit_NeoPixel.h> // Imports the NeoPixel library | |
#define LED_PIN 8 // The NeoPixels are on Port 8 | |
#define LED_COUNT 4 // There are 4 NeoPixels on the board | |
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); | |
void user_setup(void) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "plant-waterer", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node ./bin/www" | |
}, | |
"dependencies": { | |
"node-schedule": "^1.3.2", | |
"onoff": "^6.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path 'websites/plant-classifier/PlantClassifierWeb/plant-classifier-web/src/plant-disease-data/train' -Recurse -Name | Out-File -FilePath desktop\filenames.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoProperties = Object.entries(taco); // Array looks like [['tortillaType', 'corn'], ['meat', 'chicken'], ['toppings', 'lettuce, cheese, tomatoes']] | |
const updatedTacoArr = tacoProperties.map(property => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoArr = Object.entries(taco); | |
console.log(tacoArr); // Expected output: [['tortillaType', 'corn'], ['meat', 'chicken'], ['toppings', 'lettuce, cheese, tomatoes']] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoValues = Object.values(taco); | |
console.log(tacoValues); // Expected output: ['corn', 'chicken', 'lettuce, cheese tomatoes'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoProperties = Object.keys(taco); | |
console.log(tacoProperties); // Expected output: ['tortillaType', 'meat', 'toppings'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoArr = []; | |
for (value in taco) { | |
tacoArr.push([value, taco[value]]); | |
} |
NewerOlder