CanSat Tutorials

CanSat · Tutorials and components

Your CanSat needs code. Here is where to learn it.

A model satellite the size of a drink can has to read its own sensors, pack the numbers up and send them to the ground, once a second, while falling. These pages teach the coding part from the beginning, with sketches you can copy, run on a real board, and then change until you understand them.

9Arduino tutorials, in order, starting from nothing
10starter components, with what each one is actually for
66 mmthe inside of the can, and the limit behind most design decisions

Using these pages

Guidance

Every sketch here is complete, tested and free to copy. Each tutorial explains the code line by line, then asks you to change it. Your CanSat is marked on the decisions your team makes and the tests you run, so build your flight software on top of these sketches and make it your own.

These pages also collect the small problems that can cost you an evening: a USB driver that will not install, a missing semicolon, a sensor stuck at zero. That last one is usually the address. The sensor answers on 0x76 and the code asks for 0x77. The fixes are written down so your team can get on with the mission.

  • Students: start at tutorial one even if someone in the team has coded before. It takes twenty minutes and it means everyone can read the flight software.
  • Teachers and mentors: each tutorial stands alone as a lesson, with a sketch, an explanation of every line, a troubleshooting table and a set of changes to try.
  • Everyone: if you use code from here in a report, reference it. The rules ask for the source and the date of anything you did not write yourselves.

Where the rules live

Check the official documents

The competition documents always win. Numbers on these pages are only as current as the day they were written. Check any size, mass, deadline or frequency limit against this year's papers before you rely on it.

DocumentWhat it is for
The CanSat Book (ESA)The long, thorough guide: what a CanSat is, missions, electronics, mechanics, recovery, the ground station and the maths. Read this one first.
cansat.esa.intESA's CanSat pages, including the European competition the UK winner goes on to.
UK CanSat, via ESERO-UKThe UK competition: the current year's guidelines, the report templates, the deadlines and the launch events.
Your team's own test resultsIn the end, the only evidence that counts. Nothing on this page is a substitute for dropping your parachute off a sports hall balcony and timing it.

Not affiliated with ESA or ESERO-UK. Written as a teaching aid by a STEM Ambassador.

Still to come

What gets added next

These pages grow as the season goes on. The coding tutorials came first because they are the part teams usually get stuck on earliest. Likely additions:

  • Logging to a microSD card, so the data survives a lost can
  • A ground station on a laptop: saving and graphing packets as they arrive
  • Secondary mission sensors, and what makes a measurement worth taking in 30 seconds
  • The same sketches in MicroPython, for teams who would rather write Python
  • Parachute sizing, drop testing, and the arithmetic behind both

If something here is wrong, out of date, or explained badly, tell me. There are contact details on the main site.