- Introduction
- 1. Background
- 2. Hardware/knowledge requirements
- 3. Setting up a development environment
- 3.1. Linux
- 3.2. Windows
- 3.3. macOS
- 3.4. Verify the installation
- 3.5. Setting up your IDE
- 4. Meet your hardware
- 4.1. micro:bit v2
- 4.2. Rust Embedded terminology
- 5. Meet your software
- 5.1. Embedded Setup
- 5.2. Build it
- 5.3. Flash it
- 5.4. Debug it
- 5.5. Light it up
- 6. Hello World
- 6.1. Toggle it
- 6.2. Spin wait
- 6.3. NOP
- 6.4. Timers
- 6.5. Portability
- 6.6. Board support crate
- 7. LED roulette
- 7.1. The challenge
- 7.2. My solution
- 8. Inputs and Outputs
- 8.1. Polling
- 8.2. Turn signaller
- 8.3. My solution
- 8.4. Polling sucks, actually
- 9. Registers
- 9.1. RTRM
- 9.2. (mis)Optimization
- 9.3. 0xBAAAAAAD address
- 9.4. Spooky action at a distance
- 9.5. Type safe manipulation
- 10. Serial communication
- 10.1. *nix tooling
- 10.2. Windows tooling
- 11. UART
- 11.1. Send a single byte
- 11.2. Send a string
- 11.3. Naive approach and write!
- 11.4. Receive a single byte
- 11.5. Echo server
- 11.6. Reverse a string
- 11.7. My solution
- 12. I2C
- 12.1. The general protocol
- 12.2. LSM303AGR
- 12.3. Read a single register
- 12.4. Using a driver
- 12.5. The challenge
- 12.6. My solution
- 13. LED compass
- 13.1. Magnitude
- 13.2. The challenge
- 13.3. My solution
- 14. Punch-o-meter
- 14.1. Gravity is up?
- 14.2. The challenge
- 14.3. My solution
- 15. Interrupts
- 15.1. NVIC and interrupt priority
- 15.2. Sharing data with globals
- 15.3. Debouncing
- 15.4. Waiting to be interrupted
- 15.5. The MB2 speaker
- 15.6. The challenge
- 15.7. My solution
- 15.8. Addendum: PWM
- 16. Snake game
- 16.1. Game logic
- 16.2. Controls
- 16.3. Non-blocking display
- 16.4. Final assembly
- 17. What's left for you to explore
- Download epub version of the book
- General troubleshooting
- How to use GDB
- Magnetometer calibration
- Licenses and attribution