IO1: How embedded and IoT systems are different

Lesson 2 of 5 · reading 15–25 minutes; practice and project time is on the module page

Microcontrollers are not small laptops

🎯You'll be able to

Explain how a microcontroller differs from a computer in memory, storage, operating system and power, and what that means for code.

🏠The everyday picture

A pocket calculator and a laptop can both add numbers. The calculator runs for a year on a tiny battery, starts instantly and does one job. The laptop can do anything, but needs charging every day.

📘What it really is

📝A worked example

Input: a learner wants to keep a week of readings in RAM on a chip with 320 KB of RAM.

Steps:

  1. Work out the size: one reading as JSON is about 100 bytes; a week at one every 15 minutes is 672 readings, about 67 KB.
  2. Compare: that's a fifth of all RAM, and RAM is lost in deep sleep or a reset anyway.
  3. Decide: keep readings in flash, a few at a time, and keep RAM for the work of the current wake.

Expected output: the reasoning that leads to JalSetu's flash buffer (IO8 explains it in full).

🌍Where it's used

📝Case scenario

A team ported a web-style library that built large JSON strings to a small chip. The device crashed every few hours when memory ran out in pieces. Building messages in a fixed buffer and reusing it stopped the crashes.

🖱️Try it

Look up the memory of one microcontroller board (for example an ESP32 or a Raspberry Pi Pico) on its maker's site. Compare its RAM and flash with your phone's. Success: two numbers for each, with the source named.

⚠️Common mistakes

🛠️For your project

Project 1's state lives in RTC memory and Project 2's readings live in flash, because RAM doesn't survive deep sleep.

✅Quick check

Why do IoT devices keep long-term data in flash rather than RAM?

Show the answer

RAM is small and loses its contents in deep sleep or a reset; flash keeps them.

Why is writing to flash on every small change a problem?

Show the answer

Flash wears out after many writes, and each write costs power and time.

← PreviousWhat an IoT engineer does
ProLearners Assist