Scratching a little itch I have about simple Pomodoro timers. This code will run on:
- Arduino Uno R3 and similar Arduino boards
- Intel Edison + Arduino Breakout
- Tessel 2
- Raspberry Pi 3 (coming soon)
Wiring
You'll need:
- 3.3V or 5V basic LCD display (depending on your device's logic-level voltage)
- 5 pushbuttons
- 5 10kΩ resistors
- 1 standard LED
- 1 100Ω (3.3V devices) or 220Ω (5v devices) resistor
- 1 10kΩ potentiometer
- A breadboard or two
- A whole grip of jumper wires
Install and Use
- Clone/fork/download/whatever repo
npm install
- Continue with board-specific instructions below
Board-Specific Instructions
Note: The current method of swapping out require
'd config
modules in main.js
is hamfisted. It got this way because of the need to run the script in contexts that might not be able to take command-line args (e.g. t2
) but I'll make it better when I get a chance.
Arduino-Compatible (Uno-ish) Boards
You shouldn't have to make any adjustments to code unless you use different pins than are declared in config.js
for your components.
node main.js
npm install
- Plug components in (TODO: fritzing)
node main.js
Tessel 2
Note: Make sure to use a 3.3V LCD
- You'll need the
tessel-io
I/O plugin for Johnny-Five:npm install tessel-io
- Edit
main.js
to useconfig-tessel.js
- Make sure your components are plugged into the pins declared in
config-tessel.js
t2 run main.js
Edison + Arduino
Note: To run this on an Edison, I recommend that you clone this repo to the Edison itself (fortunately the default Yocto Linux on Edison comes with the git
and the npm
that you need).
- You'll need the
galileo-io
I/O plugin for Johnny-Five:npm install galileo-io
- Edit
main.js
to useconfig-edison.js
- Make sure your components are plugged into the pins declared in
config-edison.js
node main.js
(run this on the Edison)