- Arduino - https://www.arduino.cc
- Particle / Spark - https://www.particle.io
- Bean - http://legacy.punchthrough.com/bean/
- Bean+ Kickstarter - https://www.kickstarter.com/projects/1966384672/a-bluetooth-arduino-for-the-mobile-age-lightblue-b
- https://www.sparkfun.com/tutorials/329 (arduino)
- https://www.arduino.cc/en/Tutorial/Foundations (arduino)
- https://www.arduino.cc/en/Tutorial/Sketch (arduino)
- https://www.parallax.com (parts)
- http://www.phidgets.com (sensors)
- http://www.maddmansrealm.com/drwho/tardis/sounds/sounds.htm - Tardis sound files
int led1 = D0;
void setup() {
pinMode(led1, OUTPUT);
}
void loop() {
// turn on for 5 minutes
digitalWrite(led1, HIGH);
delay(1000 * 60 * 5);
// delay(1000 * 1);
// turn off for 55 minutes
digitalWrite(led1, LOW);
delay(1000 * 60 * 5);
// delay(1000 * 1);
}
const int LED = 11;
void loop() {
float in, out;
for (in = 0; in < 6.283; in = in + 0.001)
{
out = sin(in) * 127.5 + 127.5;
analogWrite(LED,out);
}
}
The Spark Math library does not have sin()!
int led1 = D0;
void setup() {
pinMode(led1, OUTPUT);
}
void loop() {
// The Spark Math library does not have a sin()!
float out;
for (out = 0; out <= 255; out++) {
delay(10);
analogWrite(led1, out);
if (out == 255) {
for (out = 255; out > 0; out--) {
delay(10);
analogWrite(led1, out);
}
}
}
}
delay()
will not evaluate an expression, so don't do math in it to calculate the time to delay in a human readable format.
- Install Bean Loader - https://punchthrough.com/bean/guides/everything-else/downloads/#software-downloads
- Install Ardunio IDE - https://www.arduino.cc/en/Main/Software
As easy as:
- Write code in Arduino IDE
- Verify code in Arduino IDE (it's a button to click)
- Upload code in Arduino IDE (it's another button to click)
- Program Skitch in Bean Loader (contextual menu item / assumes connection to the Bean is good)
Can develop ...
- in the cloud - https://build.particle.io
- locally with the Particle Dev IDE - https://www.particle.io/dev
- https://www.particle.io/cli
- https://docs.particle.io/reference/cli/
- Core: https://docs.particle.io/guide/getting-started/connect/core/
$ npm i -g particle-cli
$ particle login
? Please enter your email address jmeyoung@gmail.com
? Please enter your password ********
> Successfully completed login!