Coder Social home page Coder Social logo

jc-cr / arduinoclicontrol Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

Simple how to and example guide for how to program and communicate with an Arduino dev board from Ubuntu CLI

License: GNU General Public License v3.0

Makefile 19.25% C++ 80.75%

arduinoclicontrol's Introduction

ArduinoCLIControl

This goal of this repo is to provide an example of how you would program and communicate with an Arduino dev board from an Ubunutu CLI instead of using the Arduino IDE.

For this example I made a library for communicating with arduino nano, specifically for communicating with the ATmega328P microprocessor with UART, and then toggling the on board LED via minicom package.

How To

  1. Install required packages:
sudo apt install minicom gcc-avr avr-libc avrdude
  1. (Optional) Create udev rules so you can always find your device when connected.
  2. Make a new project folder. If you want to try out this repo you could just do:
git clone https://github.com/jc-cr/ArduinoCLIControl.git
  1. Pump out some code for your microcontroller.

    • In my repo I created a main.cc in which I included my library for UART comm and LED toggling, ledController.h.
  2. Create a Makefile.

    • Check out my for an example, but also check this out for how to make your own:
    • AVR Makefile Example
  3. Compile and upload (Assuming your device is connected):

make 
make upload
  1. Connect and communicate. With minicom you can do:
    • Make sure to update with your device symlink name or USB port (found with lsusb)
minicom -D /dev/yourDevice -b 9600

You can exit minicom by doing the following keystrokes:

Ctrl + A
X
Enter

arduinoclicontrol's People

Contributors

jc-cr 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.