GithubHelp home page GithubHelp logo

llefranc / 42_piscine_electronique Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8.42 MB

Optionnal project: microcontroller programming on ATMega328P, with I/O registers, PWM cycle, interrupts, EEPROM access and UART/I2C/SPI serial communication.

Makefile 18.31% C 81.69%
atmega328p eeprom i2c microcontroller pwm spi timers uart interrupts

42_piscine_electronique's Introduction

Piscine électronique (@42Paris)

⬇️ Below is the video of the result after two weeks of work (code here) ⬇️

Watch the video

About

This was an optionnal project that I did which introduced me to the world of microcontroller programming in C.

42Chips, the electronic association from 42 school designed a dev kit with several components:

  • An ATMega328P microcontroller
  • Several push buttons
  • Several red LEDs
  • A temperature and humidity sensor reachable through I2C bus
  • A real time clock reachable through I2C bus
  • A 16 bits I/O expander reachable through I2C bus
  • A segments display
  • RGB LEDs reachable through SPI bus
  • An UART to USB port
  • 3 analog sensors: a potentiometer, a light detector and a NTC

Full schema of the devkit available here

The exercises

The goal of the project was to get familiar and interact will all these different components.

We were allowed to only use C language and no external library. Each exercise has to be completed by interacting with the ATMega328P registers, using the chip's documentation as source.

A new pool of exercises for a new thematic was unlocked each day of the week during two weeks.

  • ➡️ D00: I/O registers.
  • ➡️ D01: Timers and PWM cycles.
  • ➡️ D02: Interrupts.
  • ➡️ D03: UART protocol.
  • ➡️ D04: I2C protocol.
  • ➡️ D05: EEPROM.
  • ➡️ D06: RGB LED.
  • ➡️ D07: Analog-to-Digital Converter (ADC).
  • ➡️ D08: SPI protocol.
  • ➡️ D09: Expander and segments display.

There was also each weekend a rush project.

  • ➡️ R00: Game using I2C protocol (unfortunately I didn't have enough time to do this one).
  • ➡️ R01: A program interacting with all the devkit's components.

42_piscine_electronique's People

Contributors

llefranc avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.