Giter Club home page Giter Club logo

arduino-mk-utils's Introduction

arduino-mk-utils

This packages supplies utilities and helper wrappers around the Arduino-Makefile package. The following makefile commands are implemented.

  1. make (or just make all): Compiles the sketch given by ARD_MK_UTILS_SKETCH_DIR env variable which must be set by the user (or more typically, automatically set by the sketch Makefile; see Examples section). Dependencies are downloaded and installed (see the Dependencies section).

  2. make clean: Deletes the files created by get-dependencies.sh.

Dependencies

  1. Checks out sudar/Arduino-Makefile into a subdirectory.

  2. Updates any required system dependencies via sudo apt-get etc.

  3. Updates the env.sh file for any environment needed by Arduino-Makefile (e.g., ARDUINO_DIR) or any other environment required by the Arduino software itself.

Examples

Examples are under the examples subdirectory. The examples show a sketch Makefile that works just like the Arduino-Makefile sketch Makefiles (is a child Makefile), but of course with the addition of dependency management via including a arduino-mk-utils-bootstrap.mk helper file. You may or may not have to set certain variables required by Arduino-Makefile such as MONITOR_PORT (see the Finding the MONITOR_PORT section below for details).

To compile, upload, and run a blink sketch (set ARD_MK_UTILS_DIR to the directory where you downloaded this package into):

cd examples/Blink
ARD_MK_UTILS_DIR=$HOME/bgoodr/arduino-mk-utils make
ARD_MK_UTILS_DIR=$HOME/bgoodr/arduino-mk-utils make upload

If you have some local Python installed into your PATH that doesn't have the "serial" module, you can set the path to the system-installed Python via:

PATH=/usr/bin:$PATH ARD_MK_UTILS_DIR=$HOME/bgoodr/arduino-mk-utils make upload

Finding the MONITOR_PORT

For instance, on Ubuntu or Debian Linux, commonly MONITOR_PORT turns out to be /dev/ttyACM0. When the upload rule is executed, this package attempts to determine the MONITOR_PORT by using the underlying Arduino-Makefile/Arduino.mk help rule to identify it (processing done inside fix-monitor-port-permissions.sh). The USB cable has to be plugged in for this to work.

On Linux, you can also determine this device path via the following procedure:

  1. Before connecting the arduino USB cable to the computer execute: find /dev/ >/tmp/dev.1

  2. Connect the USB cable and then execute : find /dev/ >/tmp/dev.2

  3. Then execute: diff -u /tmp/dev.1 /tmp/dev.2 | grep -e '+/dev/tty'

  4. You will then see something like:

    +/dev/ttyACM0

  5. The /dev/ttyACM0 line in the diff output is the value to set to MONITOR_PORT.

arduino-mk-utils's People

Contributors

bgoodr avatar

Watchers

 avatar  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.