mirror of
https://github.com/xodio/xod.git
synced 2026-02-20 02:01:20 +01:00
5
Tutorial Outline
Victor Nakoryakov edited this page 2019-02-25 15:34:41 +03:00
The built-in XOD tutorial is aimed to introduce Pete to the wonderful world of physical computing.
A few principles behind the tutorial are:
- Each lesson carries a small portion of knowledge. One new concept per lesson is an ideal target. See Codecademy for inspiration.
- Each lesson strives to be a try-play-improve loop
- Every patch used in lessons is functional in its initial state
- Use simulation as long as possible postponing the requirement of physical hardware; this covers a wider audience
- Concentrate hardware introduction in a single span so that people who lack the hardware could jump the section and fallback to tweaks/watches
- Use only hardware available with the most popular Arduino starter kits such as Arduino.cc Starter Kit or Sparkfun Inventor Kit
| Name | Knowledge | Initial Patch | Tasks | Extra notes |
|---|---|---|---|---|
| hello | Project browser | clock + count + watch | Go to 02-simulate | |
| simulate | How to run simulation | clock + count + watch | Run simulation | |
| inspector | How to bind values | clock + count + watch | Change interval of clock | |
| patching | How to add, move and link nodes | clock + count + watch | Make a parallel branch of clock + count + watch | Mention double click, I key, dragging from Project Browser, and Ctrl+C/V |
| tweaks | Using number tweak | tweak + clock + count + watch / clock + count + watch | (a) Play with tweak (b) Link it to another clock (c) Try additional tweak | Mention constant nodes |
| booleans | Boolean type | tweak-boolean + tweak-number + clock + count + watch / another branch | (a) Play with boolean tweak to enable/disable clock (b) Add another tweak | |
| pulses | Pulse type | clock + count + tweak-pulse + watch / another branch | (a) Play with pulse to reset counter (b) Try another tweak to reset clock | |
| help | Using help bar and h-key popups | 2× clock + 2× count + multiply + watch | (a) Learn what multiply does (b) Discover xod/math (c) Replace multiplication with addition | Explain Quick Help and Helpboxes |
| variadics | Drag to increase number of inputs | 2× clock + 2× count + add + tweak-number + watch | (a) Add more add inputs with more tweaks as input | |
| flip-flop | Learn flip-flop | clock + flip-flop + watch | (a) Replace clock with tweak-pulse (b) Add tweak-pulses to SET and RST | |
| if-else | Node if-else | tweak-boolean + if-else + 2× clock + 2× count + watch | (a) Play to choose watch source (b) Replace tweak-boolean with flip-flop driven by clock | |
| strings | Introduce strings | clock + flip-flop + if-else + watch | (a) Observe Hello/World switching (b) Bind XOD/Cool | |
| 🚩 Hardware | ||||
| upload | Learn to upload | clock + flip-flop + led | Play with blink interval | Schemes are always available on the web. If you have no hardware, skip to Patterns, replace hardware nodes with watches and tweaks |
| led | Learn LED node and PORT | clock + flip-flop + led@13, uncofigured led | (a) Set the port value, (b) Add tweak-number to control brightness | |
| button | Get familiar with button | button + watch, led | (a) Observe button values, (b) Make tactile switch by introducing flip-flop | |
| pot | Get familiar with pot | pot + watch | (a) Observe pot values, (b) Add LED and control its brightness | |
| servo | Get familiar with servo | pot + servo + arm + watch | (a) Observe servo rotation, (b) Calibrate by adjusting Pmin, Pmax | Explain custom types |
| manipulator | Running a movement in sequence | button + servo + 4× arm | (a) Play with speed and angles, (b) Add other arm stages | |
| text-lcd | Learn LCD | text-lcd, text-lcd-i2c + display-2-lines + 2× tweak-string | (a) Wire either of text-lcd, (b) Play with strings being output | |
| tmp36 | Learn thermometer | tmp36 + thermometer + watch | (a) Observe values, (b) Output the values to LCD | |
| ldr | Get familiar with analog-sensor | analog-sensor + watch | (a) Observe values, (b) Output the values to LCD | |
| 🚩 Patterns | ||||
| matching-ranges | map, map-clip | tmp36 + thermometer + map + servo + arm + watch | (a) Observe and adjust map values, (b) draw a gauge on the paper, (c) limit range with map-clip, (d) try ldr instead of tmp36 | |
| alarm | less, greater | tmp36 + thermometer + greater + led | (a) Play, (b) Replace greater with less, (c) Use pot to adjust boundaries | |
| permanent-alarm | Combinations / patterns, flip-flop SET/RST | tmp36 + thermometer + greater + flip-flop + led | (a) Reset the board to restart, (b) Add button to reset | |
| run-for-x-seconds | delay | button + delay + led | (a) Observe: push to light up for 3 seconds, (b) adjust time | |
| loops | defer | boot + any + 3× delay + 3× led + defer | (a) Observe the loop, (b) Make it start from button, (c) Add more stages | Mention labels |
| fade | fade, bool to number cast | boot + any + 3× delay + 3× fade + 3× led + defer | Play, adjust RATE s | |
| slow-down | continuously, UPD pulse | clock + tmp36 + thermometer + text-lcd | Play, adjust IVAL | Explain Continuously |
| string-formatting | concat, format-number | clock + tmp36 + format-number + concat + text-lcd | Play, adjust rounding, suffix, and prefix | Hack to output ° symbol |
| units-of-measure | c-to-f | clock + tmp36 + c-to-f + text-lcd-16x2 | Add if-else to switch between °C and °F | |
| 🚩 Patch nodes | ||||
| traffic-light | terminals | 3× led + delay + terminals | (a) Add terminal for Green, (b) Provide patch description | |
| use-patch-nodes | How terminals become pins | 4× traffic-light | (a) Play, adjust delays, (b) Add flashing green state | |
| discover | Drill down, niix, run tab-tests | 4× traffic-light | (a) Discover: drill-down to led/delay, (b) open not-implemented in xod, (c) run tab-tests |