Skip to main content
Close-up of a 42chips embedded-C piscine circuit board, its display reading “0420”, with a code editor blurred in the background.

Learn · Embedded C

Embedded piscine

Three weeks to learn bare-metal C on a board we designed: no OS, no libraries, just you, the datasheet and the registers.

Nathan Sauret · CC BY 4.0

Duration
3 weeks
Places
100 per session
Language
C, no Norm
Board
Lent for the piscine

What it is

It runs like the C piscine (a subject a day, rushes, peer evaluations), but on an electronic board made by 42chips. Pure embedded programming: no wiring or breadboards here, that comes with the bootcamp.

What you learn

Every zone of your board is a notion, and every one of them ends up in the same chip. Scroll down to dive into it.

GPIORegisters & GPIOFlash your first program and light an LED by flipping a bit in a register. Bit shifting finally pays off.
TIM · PWMTimers & PWMBlink without blocking, dim an LED, mix any colour on an RGB LED: time becomes a peripheral.
UARTSerial (UART)Talk to your computer over a serial line: print, debug, and type commands to your board.
IRQInterruptsReact to a button or a timer the instant it happens, instead of asking every microsecond.
ADCAnalog inputsRead the real world: a potentiometer, a light sensor, a temperature, turned into numbers.
I2CI2CTwo wires, many devices: read a sensor, drive a GPIO expander and its 7-segment display.
SPISPIThe fast lane: shift data down a chain of RGB LEDs, one bit at a time, very quickly.
EEPROMEEPROMMake your board remember things after the power goes out.
The real skill: datasheetsNo library hides the hardware. Every answer is somewhere in a few hundred pages of datasheet, and by the end you'll know how to find it.

How it goes

  1. RegisterPick a session below and sign in with your 42 account.
  2. Selection100 boards, so 100 places. Priority goes to progress in the cursus, not to whoever clicked first.
  3. ConfirmGot a place? Confirm from the email within 3 days, or it goes to the next person.
  4. Day oneMonday, 10:00 at the Labelec: you pick up your board.
  5. Three weeksIntense and on site, with no other project in parallel and no freeze. The last week is for catching up.
  6. Hand it backThe board goes back for the next piscineux, and the bootcamp opens up to you.
Confirmed means committed: not showing up can get you sanctioned. And we check eligibility, so beware of TIGs 👀

Who it's for

  • Pointers, addresses and bit shifting don't scare youRequired
  • You can find your way through a long documentRequired
  • You've finished the Common CoreRequired if you're transferring from another campus.Advised
  • Electronics experienceThat's what we're here for.Not needed

Coming from another 42 campus?

You're welcome here! The piscine takes place in Paris, at the Labelec, so all three weeks are on site.

  • Sign in with your own campus's 42 account and register for a session open to other campuses.
  • Start a transfer procedure with your campus to follow the piscine in Paris; it requires a finished Common Core. Your campus's RTFM explains the steps.
  • Registration closes earlier for other campuses, to leave you time to organise the trip.
  • Plan your travel and your stay in Paris for the three weeks. See you on day one at 10:00!
Would your campus like its own piscine?Talk to us

Upcoming sessions

No upcoming piscines right now

Check back soon: new sessions are announced regularly, and first on Discord.

What comes next

Validating the piscine opens the electronics bootcamp, two weeks to learn to design and solder your own circuit boards, and then the six-month electronics module.

Questions

Can I do the embedded piscine?Depends

Check the prerequisites on the piscine page: they depend on your campus and your cursus. Places are limited by the number of boards, so if there are more registrations than boards we select, mostly by progress in the cursus. Piscines come back regularly.

Do I have to follow the Norm?No Norm

No Norm in the piscine: you'll see, it's hard enough as it is. You still work in C.

Can I keep the board?Give it back

No: it's lent for the piscine and you give it back at the end, or the pédago steps in. We know they're pretty and would make a nice souvenir, but think of the next people who want to do the piscine 🙏

Are there projects I can do while I wait?

42 subjects don't prepare you much for embedded, but understanding how a computer works at its simplest (memory, registers) helps a lot.

Good starting points

  • The first KFS projects
  • libasm

What to master

  • Memory and pointers, at the very least
  • Bonus: doing without malloc
  • Bonus: bitwise operators

Go further