Coder Social home page Coder Social logo

arduino-binarycounter's Introduction

Binary Counting using Arduino and LEDs

This repository is a quick example on how the binary system works. It shows numbers from 0-255 using 8 LEDs.

Required Parts

  • 1 Arduino (With 8 outputs)
  • 1 Breadboard
  • 9 Wires
  • 8 Resistors (220 Ω)

Structure

Oops, a picture should be here.

Code

When finished with the building, open the src/main.c file and simply copy 'n paste it into your Arduino IDE. Next, hit Ctrl+Shift+N in your Arduino IDE and copy the source code from include/types.h into that file, and save it as types.h. Now upload it to your Arduino and that's it - everything done!

Running on the Arduino

After you've uploaded your freshly compiled program, the 8 LEDs should light up sequentially (250ms delay) and stay on for half a second. Now the LEDs will be turned off and the program starts counting with the most significant bit on the left from 0 to 255 until you stop it (It counts from right to left). Have fun!

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.