commit c0e6db4dab5134ea0f3d6fe96c13baaab0b239ac Author: Martin Oldfield Date: Tue Feb 28 09:06:56 2012 +0000 Initial NWO check in diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk new file mode 100644 index 0000000..2d39095 --- /dev/null +++ b/arduino-mk/Arduino.mk @@ -0,0 +1,513 @@ +######################################################################## +# +# Arduino command line tools Makefile +# System part (i.e. project independent) +# +# Copyright (C) 2010,2011,2012 Martin Oldfield , based on +# work that is copyright Nicholas Zambetti, David A. Mellis & Hernando +# Barragan. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# Adapted from Arduino 0011 Makefile by M J Oldfield +# +# Original Arduino adaptation by mellis, eighthave, oli.keller +# +# Version 0.1 17.ii.2009 M J Oldfield +# +# 0.2 22.ii.2009 M J Oldfield +# - fixes so that the Makefile actually works! +# - support for uploading via ISP +# - orthogonal choices of using the Arduino for +# tools, libraries and uploading +# +# 0.3 21.v.2010 M J Oldfield +# - added proper license statement +# - added code from Philip Hands to reset +# Arduino prior to upload +# +# 0.4 25.v.2010 M J Oldfield +# - tweaked reset target on Philip Hands' advice +# +# 0.5 23.iii.2011 Stefan Tomanek +# - added ad-hoc library building +# 17.v.2011 M J Oldfield +# - grabbed said version from Ubuntu +# +# 0.6 22.vi.2011 M J Oldfield +# - added ard-parse-boards supports +# - added -lc to linker opts, +# on Fabien Le Lez's advice +# +# 0.7 12.vii.2011 M J Oldfield +# - moved -lm to the end of linker opts, +# to solve Frank Knopf's problem; +# - added -F to stty opts: Craig Hollabaugh +# reckons it's good for Ubuntu +# +# 0.8 12.ii.2012 M J Oldfield +# - Patches for Arduino 1.0 IDE: +# support .ino files; +# handle board 'variants'; +# tweaked compile flags. +# - Build a library from all the system +# supplied code rather than linking the .o +# files directly. +# - Let TARGET default to current directory +# as per Daniele Vergini's patch. +# - Add support for .c files in system +# libraries: Dirk-Willem van Gulik and Evan +# Goldenberg both reported this and +# provided patches in the same spirit. +# +######################################################################## +# +# STANDARD ARDUINO WORKFLOW +# +# Given a normal sketch directory, all you need to do is to create +# a small Makefile which defines a few things, and then includes this one. +# +# For example: +# +# ARDUINO_DIR = /Applications/arduino-0013 +# +# TARGET = CLItest +# ARDUINO_LIBS = Ethernet Ethernet/utility SPI +# +# BOARD_TAG = uno +# ARDUINO_PORT = /dev/cu.usb* +# +# include /usr/local/share/Arduino.mk +# +# Hopefully these will be self-explanatory but in case they're not: +# +# ARDUINO_DIR - Where the Arduino software has been unpacked +# +# TARGET - The basename used for the final files. Canonically +# this would match the .pde file, but it's not needed +# here: you could always set it to xx if you wanted! +# +# ARDUINO_LIBS - A list of any libraries used by the sketch (we +# assume these are in +# $(ARDUINO_DIR)/hardware/libraries +# +# ARDUINO_PORT - The port where the Arduino can be found (only needed +# when uploading +# +# BOARD_TAG - The ard-parse-boards tag for the board e.g. uno or mega +# 'make show_boards' shows a list +# +# You might also want to specify these, but normally they'll be read from the +# boards.txt file i.e. implied by BOARD_TAG +# +# MCU,F_CPU - The target processor description +# +# Once this file has been created the typical workflow is just +# +# $ make upload +# +# All of the object files are created in the build-cli subdirectory +# All sources should be in the current directory and can include: +# - at most one .pde or .ino file which will be treated as C++ after +# the standard Arduino header and footer have been affixed. +# - any number of .c, .cpp, .s and .h files +# +# Included libraries are built in the build-cli/libs subdirectory. +# +# Besides make upload you can also +# make - no upload +# make clean - remove all our dependencies +# make depends - update dependencies +# make reset - reset the Arduino by tickling DTR on the serial port +# make raw_upload - upload without first resetting +# make show_boards - list all the boards defined in boards.txt +# +######################################################################## +# +# ARDUINO WITH OTHER TOOLS +# +# If the tools aren't in the Arduino distribution, then you need to +# specify their location: +# +# AVR_TOOLS_PATH = /usr/bin +# AVRDUDE_CONF = /etc/avrdude/avrdude.conf +# +######################################################################## +# +# ARDUINO WITH ISP +# +# You need to specify some details of your ISP programmer and might +# also need to specify the fuse values: +# +# ISP_PROG = -c stk500v2 +# ISP_PORT = /dev/ttyACM0 +# +# You might also need to set the fuse bits, but typically they'll be +# read from boards.txt, based on the BOARD_TAG variable: +# +# ISP_LOCK_FUSE_PRE = 0x3f +# ISP_LOCK_FUSE_POST = 0xcf +# ISP_HIGH_FUSE = 0xdf +# ISP_LOW_FUSE = 0xff +# ISP_EXT_FUSE = 0x01 +# +# I think the fuses here are fine for uploading to the ATmega168 +# without bootloader. +# +# To actually do this upload use the ispload target: +# +# make ispload +# +# +######################################################################## + +######################################################################## +# +# Default TARGET to cwd (ex Daniele Vergini) +ifndef TARGET +TARGET = $(notdir $(CURDIR)) +endif + +######################################################################## + +# +# Arduino version number +ifndef ARDUINO_VERSION +ARDUINO_VERSION = 100 +endif + +# +# Some paths +# + +ifneq (ARDUINO_DIR,) + +ifndef AVR_TOOLS_PATH +AVR_TOOLS_PATH = $(ARDUINO_DIR)/hardware/tools/avr/bin +endif + +ifndef ARDUINO_ETC_PATH +ARDUINO_ETC_PATH = $(ARDUINO_DIR)/hardware/tools/avr/etc +endif + +ifndef AVRDUDE_CONF +AVRDUDE_CONF = $(ARDUINO_ETC_PATH)/avrdude.conf +endif + +ARDUINO_LIB_PATH = $(ARDUINO_DIR)/libraries +ARDUINO_CORE_PATH = $(ARDUINO_DIR)/hardware/arduino/cores/arduino +ARDUINO_VAR_PATH = $(ARDUINO_DIR)/hardware/arduino/variants + +endif + +######################################################################## +# boards.txt parsing +# +ifndef BOARD_TAG +BOARD_TAG = uno +endif + +ifndef BOARDS_TXT +BOARDS_TXT = $(ARDUINO_DIR)/hardware/arduino/boards.txt +endif + +ifndef PARSE_BOARD +PARSE_BOARD = ard-parse-boards --boards_txt=$(BOARDS_TXT) +endif + +# Which variant ? This affects the include path +ifndef VARIANT +VARIANT = $(shell $(PARSE_BOARD) $(BOARD_TAG) build.variant) +endif + +# processor stuff +ifndef MCU +MCU = $(shell $(PARSE_BOARD) $(BOARD_TAG) build.mcu) +endif + +ifndef F_CPU +F_CPU = $(shell $(PARSE_BOARD) $(BOARD_TAG) build.f_cpu) +endif + +# normal programming info +ifndef AVRDUDE_ARD_PROGRAMMER +AVRDUDE_ARD_PROGRAMMER = $(shell $(PARSE_BOARD) $(BOARD_TAG) upload.protocol) +endif + +ifndef AVRDUDE_ARD_BAUDRATE +AVRDUDE_ARD_BAUDRATE = $(shell $(PARSE_BOARD) $(BOARD_TAG) upload.speed) +endif + +# fuses if you're using e.g. ISP +ifndef ISP_LOCK_FUSE_PRE +ISP_LOCK_FUSE_PRE = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.unlock_bits) +endif + +ifndef ISP_LOCK_FUSE_POST +ISP_LOCK_FUSE_POST = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.lock_bits) +endif + +ifndef ISP_HIGH_FUSE +ISP_HIGH_FUSE = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.high_fuses) +endif + +ifndef ISP_LOW_FUSE +ISP_LOW_FUSE = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.low_fuses) +endif + +ifndef ISP_EXT_FUSE +ISP_EXT_FUSE = $(shell $(PARSE_BOARD) $(BOARD_TAG) bootloader.extended_fuses) +endif + +# Everything gets built in here +OBJDIR = build-cli + +######################################################################## +# Local sources +# +LOCAL_C_SRCS = $(wildcard *.c) +LOCAL_CPP_SRCS = $(wildcard *.cpp) +LOCAL_CC_SRCS = $(wildcard *.cc) +LOCAL_PDE_SRCS = $(wildcard *.pde) +LOCAL_INO_SRCS = $(wildcard *.ino) +LOCAL_AS_SRCS = $(wildcard *.S) +LOCAL_OBJ_FILES = $(LOCAL_C_SRCS:.c=.o) $(LOCAL_CPP_SRCS:.cpp=.o) \ + $(LOCAL_CC_SRCS:.cc=.o) $(LOCAL_PDE_SRCS:.pde=.o) \ + $(LOCAL_INO_SRCS:.ino=.o) $(LOCAL_AS_SRCS:.S=.o) +LOCAL_OBJS = $(patsubst %,$(OBJDIR)/%,$(LOCAL_OBJ_FILES)) + +# Dependency files +DEPS = $(LOCAL_OBJS:.o=.d) + +# core sources +ifeq ($(strip $(NO_CORE)),) +ifdef ARDUINO_CORE_PATH +CORE_C_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.c) +CORE_CPP_SRCS = $(wildcard $(ARDUINO_CORE_PATH)/*.cpp) +CORE_OBJ_FILES = $(CORE_C_SRCS:.c=.o) $(CORE_CPP_SRCS:.cpp=.o) +CORE_OBJS = $(patsubst $(ARDUINO_CORE_PATH)/%, \ + $(OBJDIR)/%,$(CORE_OBJ_FILES)) +endif +endif + + +######################################################################## +# Rules for making stuff +# + +# The name of the main targets +TARGET_HEX = $(OBJDIR)/$(TARGET).hex +TARGET_ELF = $(OBJDIR)/$(TARGET).elf +TARGETS = $(OBJDIR)/$(TARGET).* +CORE_LIB = $(OBJDIR)/libcore.a + +# A list of dependencies +DEP_FILE = $(OBJDIR)/depends.mk + +# Names of executables +CC = $(AVR_TOOLS_PATH)/avr-gcc +CXX = $(AVR_TOOLS_PATH)/avr-g++ +OBJCOPY = $(AVR_TOOLS_PATH)/avr-objcopy +OBJDUMP = $(AVR_TOOLS_PATH)/avr-objdump +AR = $(AVR_TOOLS_PATH)/avr-ar +SIZE = $(AVR_TOOLS_PATH)/avr-size +NM = $(AVR_TOOLS_PATH)/avr-nm +REMOVE = rm -f +MV = mv -f +CAT = cat +ECHO = echo + +# General arguments +SYS_LIBS = $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(ARDUINO_LIBS)) +SYS_INCLUDES = $(patsubst %,-I%,$(SYS_LIBS)) +LIB_C_SRCS = $(wildcard $(patsubst %,%/*.c,$(SYS_LIBS))) +LIB_CPP_SRCS = $(wildcard $(patsubst %,%/*.cpp,$(SYS_LIBS))) +LIB_OBJS = $(patsubst $(ARDUINO_LIB_PATH)/%.c,$(OBJDIR)/libs/%.o,$(LIB_C_SRCS)) \ + $(patsubst $(ARDUINO_LIB_PATH)/%.cpp,$(OBJDIR)/libs/%.o,$(LIB_CPP_SRCS)) + +CPPFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU) -DARDUINO=$(ARDUINO_VERSION) \ + -I. -I$(ARDUINO_CORE_PATH) -I$(ARDUINO_VAR_PATH)/$(VARIANT) \ + $(SYS_INCLUDES) -g -Os -w -Wall \ + -ffunction-sections -fdata-sections +CFLAGS = -std=gnu99 +CXXFLAGS = -fno-exceptions +ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp +LDFLAGS = -mmcu=$(MCU) -Wl,--gc-sections -Os + +# Expand and pick the first port +ARD_PORT = $(firstword $(wildcard $(ARDUINO_PORT))) + +# Implicit rules for building everything (needed to get everything in +# the right directory) +# +# Rather than mess around with VPATH there are quasi-duplicate rules +# here for building e.g. a system C++ file and a local C++ +# file. Besides making things simpler now, this would also make it +# easy to change the build options in future + +# library sources +$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.c + mkdir -p $(dir $@) + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ + +$(OBJDIR)/libs/%.o: $(ARDUINO_LIB_PATH)/%.cpp + mkdir -p $(dir $@) + $(CC) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +# normal local sources +# .o rules are for objects, .d for dependency tracking +# there seems to be an awful lot of duplication here!!! +$(OBJDIR)/%.o: %.c + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ + +$(OBJDIR)/%.o: %.cc + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +$(OBJDIR)/%.o: %.cpp + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +$(OBJDIR)/%.o: %.S + $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ + +$(OBJDIR)/%.o: %.s + $(CC) -c $(CPPFLAGS) $(ASFLAGS) $< -o $@ + +$(OBJDIR)/%.d: %.c + $(CC) -MM $(CPPFLAGS) $(CFLAGS) $< -MF $@ -MT $(@:.d=.o) + +$(OBJDIR)/%.d: %.cc + $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< -MF $@ -MT $(@:.d=.o) + +$(OBJDIR)/%.d: %.cpp + $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< -MF $@ -MT $(@:.d=.o) + +$(OBJDIR)/%.d: %.S + $(CC) -MM $(CPPFLAGS) $(ASFLAGS) $< -MF $@ -MT $(@:.d=.o) + +$(OBJDIR)/%.d: %.s + $(CC) -MM $(CPPFLAGS) $(ASFLAGS) $< -MF $@ -MT $(@:.d=.o) + +# the pde -> cpp -> o file +$(OBJDIR)/%.cpp: %.pde + $(ECHO) '#include "WProgram.h"' > $@ + $(CAT) $< >> $@ + +# the ino -> cpp -> o file +$(OBJDIR)/%.cpp: %.ino + $(ECHO) '#include ' > $@ + $(CAT) $< >> $@ + +$(OBJDIR)/%.o: $(OBJDIR)/%.cpp + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +$(OBJDIR)/%.d: $(OBJDIR)/%.cpp + $(CXX) -MM $(CPPFLAGS) $(CXXFLAGS) $< -MF $@ -MT $(@:.d=.o) + +# core files +$(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.c + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ + +$(OBJDIR)/%.o: $(ARDUINO_CORE_PATH)/%.cpp + $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + +# various object conversions +$(OBJDIR)/%.hex: $(OBJDIR)/%.elf + $(OBJCOPY) -O ihex -R .eeprom $< $@ + +$(OBJDIR)/%.eep: $(OBJDIR)/%.elf + -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ + --change-section-lma .eeprom=0 -O ihex $< $@ + +$(OBJDIR)/%.lss: $(OBJDIR)/%.elf + $(OBJDUMP) -h -S $< > $@ + +$(OBJDIR)/%.sym: $(OBJDIR)/%.elf + $(NM) -n $< > $@ + +######################################################################## +# +# Avrdude +# +ifndef AVRDUDE +AVRDUDE = $(AVR_TOOLS_PATH)/avrdude +endif + +AVRDUDE_COM_OPTS = -q -V -p $(MCU) +ifdef AVRDUDE_CONF +AVRDUDE_COM_OPTS += -C $(AVRDUDE_CONF) +endif + +AVRDUDE_ARD_OPTS = -c $(AVRDUDE_ARD_PROGRAMMER) -b $(AVRDUDE_ARD_BAUDRATE) -P $(ARD_PORT) + +ifndef ISP_PROG +ISP_PROG = -c stk500v2 +endif + +AVRDUDE_ISP_OPTS = -P $(ISP_PORT) $(ISP_PROG) + + +######################################################################## +# +# Explicit targets start here +# + +all: $(OBJDIR) $(TARGET_HEX) + +$(OBJDIR): + mkdir $(OBJDIR) + +$(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) + $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm + +$(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) + $(AR) rcs $@ $(CORE_OBJS) $(LIB_OBJS) + +$(DEP_FILE): $(OBJDIR) $(DEPS) + cat $(DEPS) > $(DEP_FILE) + +upload: reset raw_upload + +raw_upload: $(TARGET_HEX) + $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \ + -U flash:w:$(TARGET_HEX):i + +# stty on MacOS likes -F, but on Debian it likes -f redirecting +# stdin/out appears to work but generates a spurious error on MacOS at +# least. Perhaps it would be better to just do it in perl ? +reset: + for STTYF in 'stty -F' 'stty --file' 'stty -f' 'stty <' ; \ + do $$STTYF /dev/tty >/dev/null 2>/dev/null && break ; \ + done ;\ + $$STTYF $(ARD_PORT) hupcl ;\ + (sleep 0.1 || sleep 1) ;\ + $$STTYF $(ARD_PORT) -hupcl + +ispload: $(TARGET_HEX) + $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) -e \ + -U lock:w:$(ISP_LOCK_FUSE_PRE):m \ + -U hfuse:w:$(ISP_HIGH_FUSE):m \ + -U lfuse:w:$(ISP_LOW_FUSE):m \ + -U efuse:w:$(ISP_EXT_FUSE):m + $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) -D \ + -U flash:w:$(TARGET_HEX):i + $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ISP_OPTS) \ + -U lock:w:$(ISP_LOCK_FUSE_POST):m + +clean: + $(REMOVE) $(LOCAL_OBJS) $(CORE_OBJS) $(LIB_OBJS) $(CORE_LIB) $(TARGETS) $(DEP_FILE) $(DEPS) + +depends: $(DEPS) + cat $(DEPS) > $(DEP_FILE) + +size: $(OBJDIR) $(TARGET_HEX) + $(SIZE) $(TARGET_HEX) + +show_boards: + $(PARSE_BOARD) --boards + +.PHONY: all clean depends upload raw_upload reset size show_boards + +include $(DEP_FILE) diff --git a/arduino-mk/ard-parse-boards b/arduino-mk/ard-parse-boards new file mode 100755 index 0000000..e2de71b --- /dev/null +++ b/arduino-mk/ard-parse-boards @@ -0,0 +1,261 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +use Getopt::Long; +use Pod::Usage; +use YAML; + +my %Opt = + ( + boards_txt => '/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/boards.txt', + ); + +GetOptions(\%Opt, + "boards_txt=s", # filename of the boards.txt file + "find!", # search for data + "dump!", # dump the whole database + "boards!", # dump a list of boards + "help!", + "info!", + ); + +if ($Opt{help} || $Opt{info}) + { + usage(); + } + +my $db = parse_boards($Opt{boards_txt}); + +if ($Opt{dump}) + { + dump_data("$Opt{boards_txt} contains:", $db); + } +elsif ($Opt{find}) + { + my @terms = @ARGV or usage(); + find_data($db, \@terms); + } +elsif ($Opt{boards}) + { + dump_boards($db); + } +else + { + my $tag = shift @ARGV or usage(); + + if (my $key = shift @ARGV) + { + die "$key isn't defined for the $tag board, " + unless $db->{$tag} && exists $db->{$tag}->{$key}; + + print $db->{$tag}->{$key}, "\n"; + } + else + { + die "The $tag board isn't defined, " + unless $db->{$tag}; + + dump_data("The $tag board:", $db->{$tag}); + } + } + +## here endeth the main + +sub usage + { + pod2usage(-verbose => 2); + } + +# return HoH: {board}->{field} = value +sub parse_boards + { + my $filename = shift; + + my %b; + + open(my $fh, '<', $filename) + or die "Can't open $filename, "; + + while(<$fh>) + { + my ($board, $key, $value) = /^\s*(\S+?)\.(\S+?)\s*=\s*(.+?)\s*$/ + or next; + + $b{$board}->{$key} = $value; + } + + return \%b; + } + +# A rudimentary search engine +sub find_data + { + my ($db, $term_list) = @_; + + my @q = map { qr/$_/i } @$term_list; + my $q = join(' && ', map { "/$_/i" } @$term_list); + + my %hit; + foreach my $b (keys %$db) + { + foreach my $k (keys %{$db->{$b}}) + { + my $v = $db->{$b}->{$k}; + $hit{$b}->{$k} = $v if !grep { $v !~ /$_/i } @q; + } + } + + dump_data("Matches for $q:", \%hit); + } + +# The list of boards... +sub dump_boards + { + my $db = shift or return; + + my %name; + my $max_l = 0; + foreach my $b (keys %$db) + { + $name{$b} = $db->{$b}->{name} || 'Anonymous'; + $max_l = length($b) if $max_l < length($b); + } + + my $fmt = sprintf("%%-%ds %%s\n", $max_l + 2); + + printf $fmt, "Tag", "Board Name"; + foreach my $b (sort keys %name) + { + printf $fmt, $b, $name{$b}; + } + } + + +# dump arbitrary data with a title +sub dump_data + { + my ($title, $data) = @_; + + print "# $title\n", Dump($data); + } + +__END__ + +=head1 NAME + +ard-parse-boards - Read data from the Arduino boards.txt file + +=head1 USAGE + + Dump all the data in the file: + $ ard-parse-boards --dump + + See which boards we know about: + $ ard-parse-boards --boards + + Look for a particular board... + $ ard-parse-boards --find uno + + ...multiple terms are implicitly ANDed: + $ ard-parse-boards --find duemil 328 + + Dump all the data for a particular board: + $ ard-parse-boards atmega328 + + Extract a particular field: + $ ard-parse-boards atmega328 build.f_cpu + +=head1 DESCRIPTION + +The Arduino software package ships with a boards.txt file which tells +the Arduino IDE details about particular hardware. So when the user +says he's got a shiny new Arduino Uno, boards.txt knows that it has a +16MHz ATmega328 on it. It would be nice to access these data from the +command line too. + +In normal operation you simply specify the tag given to the board in +the boards.txt file, and optionally a field name. This program then +extracts the data to STDOUT. + +Most boards have names which are quite unwieldy, so we always refer to +a board by a tag, not its name. Strictly the tag is the bit before the +first dot in the boards.txt key. You can see a list of board tags and +names with the C<--boards> option. + +=head1 OPTIONS + +=over + +=item --boards_txt=[file] + +Specify the full path to the boards.txt file. + +=back + +The following options all disable the normal 'lookup' operation. + +=over + +=item --dump + +Dump the complete database in YAML format. + +=item ---boards + +Print a list of the tag and name of every board in the file. + +=item --find [query] ... + +Find matching data. Strictly, return a list of values which match all +of the query terms, treating each term as a case-insensitive regexp. + +For example: + +=over + +=item --find 328 + +List data containing 328 (anywhere in the value). + +=item --find due + +List data containing 'due' (e.g. duemilanove). + +=item --find 328 due + +List data containing both 328 and due. + +=back + +=back + +=head1 BUGS AND LIMITATIONS + +There are no known bugs in this application. + +Please report problems to the author. + +Patches are welcome. + +=head1 AUTHOR + +Martin Oldfield, ex-atelier@mjo.tc + +Thanks to Mark Sproul who suggested doing something like this to me ages ago. + +=head1 LICENCE AND COPYRIGHT + +Copyright (c) 2011, Martin Oldfield. All rights reserved. + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + diff --git a/arduino-mk/licence.txt b/arduino-mk/licence.txt new file mode 100644 index 0000000..4362b49 --- /dev/null +++ b/arduino-mk/licence.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/arduino-mk_0.2.tar.gz b/arduino-mk_0.2.tar.gz new file mode 100644 index 0000000..6f341e2 Binary files /dev/null and b/arduino-mk_0.2.tar.gz differ diff --git a/arduino-mk_0.3.tar.gz b/arduino-mk_0.3.tar.gz new file mode 100644 index 0000000..9a9e349 Binary files /dev/null and b/arduino-mk_0.3.tar.gz differ diff --git a/arduino-mk_0.4.tar.gz b/arduino-mk_0.4.tar.gz new file mode 100644 index 0000000..fa8b241 Binary files /dev/null and b/arduino-mk_0.4.tar.gz differ diff --git a/arduino-mk_0.5.tar.gz b/arduino-mk_0.5.tar.gz new file mode 100644 index 0000000..ce3e9e6 Binary files /dev/null and b/arduino-mk_0.5.tar.gz differ diff --git a/arduino-mk_0.6.tar.gz b/arduino-mk_0.6.tar.gz new file mode 100644 index 0000000..4bd8f23 Binary files /dev/null and b/arduino-mk_0.6.tar.gz differ diff --git a/arduino-mk_0.7.tar.gz b/arduino-mk_0.7.tar.gz new file mode 100644 index 0000000..e753302 Binary files /dev/null and b/arduino-mk_0.7.tar.gz differ diff --git a/arduino-mk_0.8.tar.gz b/arduino-mk_0.8.tar.gz new file mode 100644 index 0000000..91ff5bb Binary files /dev/null and b/arduino-mk_0.8.tar.gz differ diff --git a/examples/Blink/Blink.ino b/examples/Blink/Blink.ino new file mode 100644 index 0000000..1953c39 --- /dev/null +++ b/examples/Blink/Blink.ino @@ -0,0 +1,19 @@ +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + This example code is in the public domain. + */ + +void setup() { + // initialize the digital pin as an output. + // Pin 13 has an LED connected on most Arduino boards: + pinMode(13, OUTPUT); +} + +void loop() { + digitalWrite(13, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(13, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/examples/Blink/Makefile b/examples/Blink/Makefile new file mode 100644 index 0000000..12cd3e6 --- /dev/null +++ b/examples/Blink/Makefile @@ -0,0 +1,10 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = + +include ../../arduino-mk/Arduino.mk + diff --git a/examples/Blink/build-cli/Blink.cpp b/examples/Blink/build-cli/Blink.cpp new file mode 100644 index 0000000..bb017d1 --- /dev/null +++ b/examples/Blink/build-cli/Blink.cpp @@ -0,0 +1,20 @@ +#include +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + This example code is in the public domain. + */ + +void setup() { + // initialize the digital pin as an output. + // Pin 13 has an LED connected on most Arduino boards: + pinMode(13, OUTPUT); +} + +void loop() { + digitalWrite(13, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(13, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/examples/Blink/build-cli/Blink.d b/examples/Blink/build-cli/Blink.d new file mode 100644 index 0000000..ae1f4ae --- /dev/null +++ b/examples/Blink/build-cli/Blink.d @@ -0,0 +1,11 @@ +build-cli/Blink.o: build-cli/Blink.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/Blink/build-cli/Blink.elf b/examples/Blink/build-cli/Blink.elf new file mode 100755 index 0000000..b611a63 Binary files /dev/null and b/examples/Blink/build-cli/Blink.elf differ diff --git a/examples/Blink/build-cli/Blink.hex b/examples/Blink/build-cli/Blink.hex new file mode 100644 index 0000000..06bbee5 --- /dev/null +++ b/examples/Blink/build-cli/Blink.hex @@ -0,0 +1,66 @@ +:100000000C9461000C947E000C947E000C947E0095 +:100010000C947E000C947E000C947E000C947E0068 +:100020000C947E000C947E000C947E000C947E0058 +:100030000C947E000C947E000C947E000C947E0048 +:100040000C949D000C947E000C947E000C947E0019 +:100050000C947E000C947E000C947E000C947E0028 +:100060000C947E000C947E00000000002400270009 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E +:1000D000A0E0B1E0E8E0F4E002C005900D92A030AD +:1000E000B107D9F711E0A0E0B1E001C01D92A9303D +:1000F000B107E1F70E94F3010C9480000C9400001A +:10010000F8940C9402028DE061E00E949F0168EE79 +:1001100073E080E090E00E94E5008DE060E00E94E6 +:100120009F0168EE73E080E090E00E94E500089592 +:100130008DE061E00E94790108951F920F920FB641 +:100140000F9211242F933F938F939F93AF93BF935D +:100150008091040190910501A0910601B0910701E1 +:10016000309108010196A11DB11D232F2D5F2D3760 +:1001700020F02D570196A11DB11D209308018093F9 +:10018000040190930501A0930601B09307018091AB +:10019000000190910101A0910201B091030101962B +:1001A000A11DB11D8093000190930101A093020154 +:1001B000B0930301BF91AF919F918F913F912F9188 +:1001C0000F900FBE0F901F9018959B01AC017FB749 +:1001D000F8948091000190910101A0910201B091E9 +:1001E000030166B5A89B05C06F3F19F00196A11DDC +:1001F000B11D7FBFBA2FA92F982F8827860F911D79 +:10020000A11DB11D62E0880F991FAA1FBB1F6A952F +:10021000D1F7BC012DC0FFB7F894809100019091F7 +:100220000101A0910201B0910301E6B5A89B05C0B0 +:10023000EF3F19F00196A11DB11DFFBFBA2FA92FE5 +:10024000982F88278E0F911DA11DB11DE2E0880F08 +:10025000991FAA1FBB1FEA95D1F7861B970B885ED3 +:100260009340C8F2215030404040504068517C4F8C +:10027000211531054105510571F60895789484B52D +:10028000826084BD84B5816084BD85B5826085BD92 +:1002900085B5816085BDEEE6F0E080818160808378 +:1002A000E1E8F0E01082808182608083808181605B +:1002B0008083E0E8F0E0808181608083E1EBF0E022 +:1002C000808184608083E0EBF0E0808181608083C6 +:1002D000EAE7F0E0808184608083808182608083AF +:1002E0008081816080838081806880831092C100DA +:1002F0000895482F50E0CA0186569F4FFC01249173 +:100300004A575F4FFA0184918823C1F0E82FF0E04B +:10031000EE0FFF1FE859FF4FA591B491662341F4FA +:100320009FB7F8948C91209582238C939FBF08955A +:100330009FB7F8948C91822B8C939FBF0895482F80 +:1003400050E0CA0182559F4FFC012491CA01865694 +:100350009F4FFC0194914A575F4FFA013491332328 +:1003600009F440C0222351F1233071F0243028F4E5 +:100370002130A1F0223011F514C02630B1F0273021 +:10038000C1F02430D9F404C0809180008F7703C07D +:10039000809180008F7D8093800010C084B58F771E +:1003A00002C084B58F7D84BD09C08091B0008F7775 +:1003B00003C08091B0008F7D8093B000E32FF0E008 +:1003C000EE0FFF1FEE58FF4FA591B4912FB7F89491 +:1003D000662321F48C919095892302C08C91892BFE +:1003E0008C932FBF0895CF93DF930E943E010E940C +:1003F0009800C0E0D0E00E9483002097E1F30E94C3 +:080400000000F9CFF894FFCFD2 +:00000001FF diff --git a/examples/Blink/build-cli/Blink.o b/examples/Blink/build-cli/Blink.o new file mode 100644 index 0000000..cc40501 Binary files /dev/null and b/examples/Blink/build-cli/Blink.o differ diff --git a/examples/Blink/build-cli/CDC.o b/examples/Blink/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/Blink/build-cli/CDC.o differ diff --git a/examples/Blink/build-cli/HID.o b/examples/Blink/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/Blink/build-cli/HID.o differ diff --git a/examples/Blink/build-cli/HardwareSerial.o b/examples/Blink/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/Blink/build-cli/HardwareSerial.o differ diff --git a/examples/Blink/build-cli/IPAddress.o b/examples/Blink/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/Blink/build-cli/IPAddress.o differ diff --git a/examples/Blink/build-cli/Print.o b/examples/Blink/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/Blink/build-cli/Print.o differ diff --git a/examples/Blink/build-cli/Stream.o b/examples/Blink/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/Blink/build-cli/Stream.o differ diff --git a/examples/Blink/build-cli/Tone.o b/examples/Blink/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/Blink/build-cli/Tone.o differ diff --git a/examples/Blink/build-cli/USBCore.o b/examples/Blink/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/Blink/build-cli/USBCore.o differ diff --git a/examples/Blink/build-cli/WInterrupts.o b/examples/Blink/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/Blink/build-cli/WInterrupts.o differ diff --git a/examples/Blink/build-cli/WMath.o b/examples/Blink/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/Blink/build-cli/WMath.o differ diff --git a/examples/Blink/build-cli/WString.o b/examples/Blink/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/Blink/build-cli/WString.o differ diff --git a/examples/Blink/build-cli/depends.mk b/examples/Blink/build-cli/depends.mk new file mode 100644 index 0000000..ae1f4ae --- /dev/null +++ b/examples/Blink/build-cli/depends.mk @@ -0,0 +1,11 @@ +build-cli/Blink.o: build-cli/Blink.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/Blink/build-cli/libcore.a b/examples/Blink/build-cli/libcore.a new file mode 100644 index 0000000..a6b738c Binary files /dev/null and b/examples/Blink/build-cli/libcore.a differ diff --git a/examples/Blink/build-cli/main.o b/examples/Blink/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/Blink/build-cli/main.o differ diff --git a/examples/Blink/build-cli/new.o b/examples/Blink/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/Blink/build-cli/new.o differ diff --git a/examples/Blink/build-cli/wiring.o b/examples/Blink/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/Blink/build-cli/wiring.o differ diff --git a/examples/Blink/build-cli/wiring_analog.o b/examples/Blink/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/Blink/build-cli/wiring_analog.o differ diff --git a/examples/Blink/build-cli/wiring_digital.o b/examples/Blink/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/Blink/build-cli/wiring_digital.o differ diff --git a/examples/Blink/build-cli/wiring_pulse.o b/examples/Blink/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/Blink/build-cli/wiring_pulse.o differ diff --git a/examples/Blink/build-cli/wiring_shift.o b/examples/Blink/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/Blink/build-cli/wiring_shift.o differ diff --git a/examples/BlinkWithoutDelay/.DS_Store b/examples/BlinkWithoutDelay/.DS_Store new file mode 100644 index 0000000..311ccf4 Binary files /dev/null and b/examples/BlinkWithoutDelay/.DS_Store differ diff --git a/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino b/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino new file mode 100644 index 0000000..0143571 --- /dev/null +++ b/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino @@ -0,0 +1,65 @@ +/* Blink without Delay + + Turns on and off a light emitting diode(LED) connected to a digital + pin, without using the delay() function. This means that other code + can run at the same time without being interrupted by the LED code. + + The circuit: + * LED attached from pin 13 to ground. + * Note: on most Arduinos, there is already an LED on the board + that's attached to pin 13, so no hardware is needed for this example. + + + created 2005 + by David A. Mellis + modified 8 Feb 2010 + by Paul Stoffregen + + This example code is in the public domain. + + + http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay + */ + +// constants won't change. Used here to +// set pin numbers: +const int ledPin = 13; // the number of the LED pin + +// Variables will change: +int ledState = LOW; // ledState used to set the LED +long previousMillis = 0; // will store last time LED was updated + +// the follow variables is a long because the time, measured in miliseconds, +// will quickly become a bigger number than can be stored in an int. +long interval = 1000; // interval at which to blink (milliseconds) + +void setup() { + // set the digital pin as output: + pinMode(ledPin, OUTPUT); +} + +void loop() +{ + // here is where you'd put code that needs to be running all the time. + + // check to see if it's time to blink the LED; that is, if the + // difference between the current time and last time you blinked + // the LED is bigger than the interval at which you want to + // blink the LED. + unsigned long currentMillis = millis(); + + if(currentMillis - previousMillis > interval) { + // save the last time you blinked the LED + previousMillis = currentMillis; + + // if the LED is off turn it on and vice-versa: + if (ledState == LOW) + ledState = HIGH; + else + ledState = LOW; + + // set the LED with the ledState of the variable: + digitalWrite(ledPin, ledState); + } +} + diff --git a/examples/BlinkWithoutDelay/Makefile b/examples/BlinkWithoutDelay/Makefile new file mode 100644 index 0000000..5c8c1dd --- /dev/null +++ b/examples/BlinkWithoutDelay/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = + +include ../../arduino-mk/Arduino.mk \ No newline at end of file diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp new file mode 100644 index 0000000..c8f34b6 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.cpp @@ -0,0 +1,66 @@ +#include +/* Blink without Delay + + Turns on and off a light emitting diode(LED) connected to a digital + pin, without using the delay() function. This means that other code + can run at the same time without being interrupted by the LED code. + + The circuit: + * LED attached from pin 13 to ground. + * Note: on most Arduinos, there is already an LED on the board + that's attached to pin 13, so no hardware is needed for this example. + + + created 2005 + by David A. Mellis + modified 8 Feb 2010 + by Paul Stoffregen + + This example code is in the public domain. + + + http://www.arduino.cc/en/Tutorial/BlinkWithoutDelay + */ + +// constants won't change. Used here to +// set pin numbers: +const int ledPin = 13; // the number of the LED pin + +// Variables will change: +int ledState = LOW; // ledState used to set the LED +long previousMillis = 0; // will store last time LED was updated + +// the follow variables is a long because the time, measured in miliseconds, +// will quickly become a bigger number than can be stored in an int. +long interval = 1000; // interval at which to blink (milliseconds) + +void setup() { + // set the digital pin as output: + pinMode(ledPin, OUTPUT); +} + +void loop() +{ + // here is where you'd put code that needs to be running all the time. + + // check to see if it's time to blink the LED; that is, if the + // difference between the current time and last time you blinked + // the LED is bigger than the interval at which you want to + // blink the LED. + unsigned long currentMillis = millis(); + + if(currentMillis - previousMillis > interval) { + // save the last time you blinked the LED + previousMillis = currentMillis; + + // if the LED is off turn it on and vice-versa: + if (ledState == LOW) + ledState = HIGH; + else + ledState = LOW; + + // set the LED with the ledState of the variable: + digitalWrite(ledPin, ledState); + } +} + diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d new file mode 100644 index 0000000..b0056e7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.d @@ -0,0 +1,11 @@ +build-cli/BlinkWithoutDelay.o: build-cli/BlinkWithoutDelay.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf new file mode 100755 index 0000000..0a28fac Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.elf differ diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex new file mode 100644 index 0000000..80ecfc7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.hex @@ -0,0 +1,64 @@ +:100000000C9461000C947E000C947E000C947E0095 +:100010000C947E000C947E000C947E000C947E0068 +:100020000C947E000C947E000C947E000C947E0058 +:100030000C947E000C947E000C947E000C947E0048 +:100040000C94CE000C947E000C947E000C947E00E8 +:100050000C947E000C947E000C947E000C947E0028 +:100060000C947E000C947E00000000002400270009 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E +:1000D000A0E0B1E0E4EDF3E002C005900D92A430A1 +:1000E000B107D9F711E0A4E0B1E001C01D92A3313E +:1000F000B107E1F70E94D9010C9480000C94000034 +:10010000F8940C94E801EF92FF920F931F930E94D2 +:1001100016017B018C018091060190910701A0914D +:100120000801B0910901A8019701281B390B4A0B5E +:100130005B0B8091000190910101A0910201B091AF +:10014000030182179307A407B507F0F4E0920601B4 +:10015000F0920701009308011093090180910401B6 +:1001600090910501892B39F481E090E0909305018D +:100170008093040104C010920501109204018DE0E7 +:10018000609104010E9485011F910F91FF90EF90F3 +:1001900008958DE061E00E945F0108951F920F9223 +:1001A0000FB60F9211242F933F938F939F93AF938A +:1001B000BF9380910E0190910F01A0911001B09119 +:1001C0001101309112010196A11DB11D232F2D5F48 +:1001D0002D3720F02D570196A11DB11D209312013E +:1001E00080930E0190930F01A0931001B093110121 +:1001F00080910A0190910B01A0910C01B0910D0129 +:100200000196A11DB11D80930A0190930B01A0934B +:100210000C01B0930D01BF91AF919F918F913F91D0 +:100220002F910F900FBE0F901F9018958FB7F894D5 +:1002300020910E0130910F01409110015091110158 +:100240008FBFB901CA010895789484B5826084BDD6 +:1002500084B5816084BD85B5826085BD85B58160CA +:1002600085BDEEE6F0E0808181608083E1E8F0E02A +:100270001082808182608083808181608083E0E859 +:10028000F0E0808181608083E1EBF0E08081846038 +:100290008083E0EBF0E0808181608083EAE7F0E03A +:1002A000808184608083808182608083808181609E +:1002B00080838081806880831092C1000895482FD8 +:1002C00050E0CA0186569F4FFC0124914A575F4F68 +:1002D000FA0184918823C1F0E82FF0E0EE0FFF1FB0 +:1002E000E859FF4FA591B491662341F49FB7F89464 +:1002F0008C91209582238C939FBF08959FB7F8948B +:100300008C91822B8C939FBF0895482F50E0CA0197 +:1003100082559F4FFC012491CA0186569F4FFC01D4 +:1003200094914A575F4FFA013491332309F440C046 +:10033000222351F1233071F0243028F42130A1F030 +:10034000223011F514C02630B1F02730C1F024302E +:10035000D9F404C0809180008F7703C08091800021 +:100360008F7D8093800010C084B58F7702C084B5E4 +:100370008F7D84BD09C08091B0008F7703C08091CC +:10038000B0008F7D8093B000E32FF0E0EE0FFF1FF1 +:10039000EE58FF4FA591B4912FB7F894662321F43E +:1003A0008C919095892302C08C91892B8C932FBFBF +:1003B0000895CF93DF930E9424010E94C900C0E0FA +:1003C000D0E00E9483002097E1F30E940000F9CF63 +:0403D000F894FFCFCF +:0403D400E80300003A +:00000001FF diff --git a/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o new file mode 100644 index 0000000..6d42b87 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/BlinkWithoutDelay.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/CDC.o b/examples/BlinkWithoutDelay/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/CDC.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/HID.o b/examples/BlinkWithoutDelay/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/HID.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o b/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/HardwareSerial.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/IPAddress.o b/examples/BlinkWithoutDelay/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/IPAddress.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/Print.o b/examples/BlinkWithoutDelay/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/Print.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/Stream.o b/examples/BlinkWithoutDelay/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/Stream.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/Tone.o b/examples/BlinkWithoutDelay/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/Tone.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/USBCore.o b/examples/BlinkWithoutDelay/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/USBCore.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/WInterrupts.o b/examples/BlinkWithoutDelay/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/WInterrupts.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/WMath.o b/examples/BlinkWithoutDelay/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/WMath.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/WString.o b/examples/BlinkWithoutDelay/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/WString.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/a.out.elf b/examples/BlinkWithoutDelay/build-cli/a.out.elf new file mode 100755 index 0000000..0a28fac Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/a.out.elf differ diff --git a/examples/BlinkWithoutDelay/build-cli/depends.mk b/examples/BlinkWithoutDelay/build-cli/depends.mk new file mode 100644 index 0000000..b0056e7 --- /dev/null +++ b/examples/BlinkWithoutDelay/build-cli/depends.mk @@ -0,0 +1,11 @@ +build-cli/BlinkWithoutDelay.o: build-cli/BlinkWithoutDelay.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/BlinkWithoutDelay/build-cli/libcore.a b/examples/BlinkWithoutDelay/build-cli/libcore.a new file mode 100644 index 0000000..7decf6b Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/libcore.a differ diff --git a/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o b/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o new file mode 100644 index 0000000..cc98581 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/libs/EEPROM/EEPROM.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/main.o b/examples/BlinkWithoutDelay/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/main.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/new.o b/examples/BlinkWithoutDelay/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/new.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/wiring.o b/examples/BlinkWithoutDelay/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/wiring.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_analog.o b/examples/BlinkWithoutDelay/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/wiring_analog.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_digital.o b/examples/BlinkWithoutDelay/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/wiring_digital.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o b/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/wiring_pulse.o differ diff --git a/examples/BlinkWithoutDelay/build-cli/wiring_shift.o b/examples/BlinkWithoutDelay/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/BlinkWithoutDelay/build-cli/wiring_shift.o differ diff --git a/examples/Fade/Fade.ino b/examples/Fade/Fade.ino new file mode 100644 index 0000000..b47bf43 --- /dev/null +++ b/examples/Fade/Fade.ino @@ -0,0 +1,31 @@ +/* + Fade + + This example shows how to fade an LED on pin 9 + using the analogWrite() function. + + This example code is in the public domain. + + */ +int brightness = 0; // how bright the LED is +int fadeAmount = 5; // how many points to fade the LED by + +void setup() { + // declare pin 9 to be an output: + pinMode(9, OUTPUT); +} + +void loop() { + // set the brightness of pin 9: + analogWrite(9, brightness); + + // change the brightness for next time through the loop: + brightness = brightness + fadeAmount; + + // reverse the direction of the fading at the ends of the fade: + if (brightness == 0 || brightness == 255) { + fadeAmount = -fadeAmount ; + } + // wait for 30 milliseconds to see the dimming effect + delay(30); +} diff --git a/examples/Fade/Makefile b/examples/Fade/Makefile new file mode 100644 index 0000000..5c8c1dd --- /dev/null +++ b/examples/Fade/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = + +include ../../arduino-mk/Arduino.mk \ No newline at end of file diff --git a/examples/Fade/build-cli/CDC.o b/examples/Fade/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/Fade/build-cli/CDC.o differ diff --git a/examples/Fade/build-cli/Fade.cpp b/examples/Fade/build-cli/Fade.cpp new file mode 100644 index 0000000..7915fa7 --- /dev/null +++ b/examples/Fade/build-cli/Fade.cpp @@ -0,0 +1,32 @@ +#include +/* + Fade + + This example shows how to fade an LED on pin 9 + using the analogWrite() function. + + This example code is in the public domain. + + */ +int brightness = 0; // how bright the LED is +int fadeAmount = 5; // how many points to fade the LED by + +void setup() { + // declare pin 9 to be an output: + pinMode(9, OUTPUT); +} + +void loop() { + // set the brightness of pin 9: + analogWrite(9, brightness); + + // change the brightness for next time through the loop: + brightness = brightness + fadeAmount; + + // reverse the direction of the fading at the ends of the fade: + if (brightness == 0 || brightness == 255) { + fadeAmount = -fadeAmount ; + } + // wait for 30 milliseconds to see the dimming effect + delay(30); +} diff --git a/examples/Fade/build-cli/Fade.d b/examples/Fade/build-cli/Fade.d new file mode 100644 index 0000000..c503144 --- /dev/null +++ b/examples/Fade/build-cli/Fade.d @@ -0,0 +1,11 @@ +build-cli/Fade.o: build-cli/Fade.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/Fade/build-cli/Fade.elf b/examples/Fade/build-cli/Fade.elf new file mode 100755 index 0000000..cfd7d8b Binary files /dev/null and b/examples/Fade/build-cli/Fade.elf differ diff --git a/examples/Fade/build-cli/Fade.hex b/examples/Fade/build-cli/Fade.hex new file mode 100644 index 0000000..ccf6f4b --- /dev/null +++ b/examples/Fade/build-cli/Fade.hex @@ -0,0 +1,81 @@ +:100000000C9461000C947E000C947E000C947E0095 +:100010000C947E000C947E000C947E000C947E0068 +:100020000C947E000C947E000C947E000C947E0058 +:100030000C947E000C947E000C947E000C947E0048 +:100040000C94B1000C947E000C947E000C947E0005 +:100050000C947E000C947E000C947E000C947E0028 +:100060000C947E000C947E00000000002400270009 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C000000011241FBECFEFD8E0DEBFCDBF11E08E +:1000D000A0E0B1E0E0EFF4E002C005900D92A230A4 +:1000E000B107D9F711E0A2E0B1E001C01D92AD3037 +:1000F000B107E1F70E9467020C9480000C940000A5 +:10010000F8940C947602609102017091030189E0E9 +:100110000E948D0120910001309101018091020126 +:1001200090910301820F931F90930301809302012A +:10013000009719F08F3F910541F488279927821B7A +:10014000930B90930101809300016EE170E080E0D9 +:1001500090E00E94F900089589E061E00E94ED01BD +:1001600008951F920F920FB60F9211242F933F9371 +:100170008F939F93AF93BF93809108019091090152 +:10018000A0910A01B0910B0130910C010196A11DC3 +:10019000B11D232F2D5F2D3720F02D570196A11D66 +:1001A000B11D20930C018093080190930901A09345 +:1001B0000A01B0930B018091040190910501A09177 +:1001C0000601B09107010196A11DB11D80930401A4 +:1001D00090930501A0930601B0930701BF91AF91E1 +:1001E0009F918F913F912F910F900FBE0F901F9075 +:1001F00018959B01AC017FB7F89480910401909110 +:100200000501A0910601B091070166B5A89B05C044 +:100210006F3F19F00196A11DB11D7FBFBA2FA92F05 +:10022000982F8827860F911DA11DB11D62E0880FB0 +:10023000991FAA1FBB1F6A95D1F7BC012DC0FFB73C +:10024000F8948091040190910501A0910601B0916C +:100250000701E6B5A89B05C0EF3F19F00196A11D67 +:10026000B11DFFBFBA2FA92F982F88278E0F911D80 +:10027000A11DB11DE2E0880F991FAA1FBB1FEA95BF +:10028000D1F7861B970B885E9340C8F2215030400F +:100290004040504068517C4F2115310541055105C2 +:1002A00071F60895789484B5826084BD84B58160C8 +:1002B00084BD85B5826085BD85B5816085BDEEE66E +:1002C000F0E0808181608083E1E8F0E0108280814D +:1002D00082608083808181608083E0E8F0E08081BB +:1002E00081608083E1EBF0E0808184608083E0EBDB +:1002F000F0E0808181608083EAE7F0E080818460C3 +:10030000808380818260808380818160808380811E +:10031000806880831092C10008951F93CF93DF936C +:10032000182FEB0161E00E94ED01209709F44AC00B +:10033000CF3FD10509F449C0E12FF0E0E255FF4F6E +:1003400084918330C1F0843028F4813051F08230C0 +:10035000B1F50CC0863019F1873049F1843079F558 +:1003600014C084B5806884BDC7BD33C084B58062C5 +:1003700084BDC8BD2EC080918000806880938000BD +:10038000D0938900C093880024C08091800080624F +:1003900080938000D0938B00C0938A001AC0809114 +:1003A000B00080688093B000C093B30012C0809109 +:1003B000B00080628093B000C093B4000AC0C0381F +:1003C000D1051CF4812F60E002C0812F61E00E9402 +:1003D0001302DF91CF911F910895482F50E0CA0179 +:1003E00086569F4FFC0124914A575F4FFA01849132 +:1003F0008823C1F0E82FF0E0EE0FFF1FE859FF4F10 +:10040000A591B491662341F49FB7F8948C912095FF +:1004100082238C939FBF08959FB7F8948C91822B71 +:100420008C939FBF0895482F50E0CA0182559F4F7B +:10043000FC012491CA0186569F4FFC0194914A57B2 +:100440005F4FFA013491332309F440C0222351F164 +:10045000233071F0243028F42130A1F0223011F53E +:1004600014C02630B1F02730C1F02430D9F404C0D4 +:10047000809180008F7703C0809180008F7D809372 +:10048000800010C084B58F7702C084B58F7D84BD95 +:1004900009C08091B0008F7703C08091B0008F7D3C +:1004A0008093B000E32FF0E0EE0FFF1FEE58FF4FF8 +:1004B000A591B4912FB7F894662321F48C9190956F +:1004C000892302C08C91892B8C932FBF0895CF93E1 +:1004D000DF930E9452010E94AC00C0E0D0E00E9475 +:1004E00083002097E1F30E940000F9CFF894FFCF3A +:0204F000050005 +:00000001FF diff --git a/examples/Fade/build-cli/Fade.o b/examples/Fade/build-cli/Fade.o new file mode 100644 index 0000000..59f361d Binary files /dev/null and b/examples/Fade/build-cli/Fade.o differ diff --git a/examples/Fade/build-cli/HID.o b/examples/Fade/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/Fade/build-cli/HID.o differ diff --git a/examples/Fade/build-cli/HardwareSerial.o b/examples/Fade/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/Fade/build-cli/HardwareSerial.o differ diff --git a/examples/Fade/build-cli/IPAddress.o b/examples/Fade/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/Fade/build-cli/IPAddress.o differ diff --git a/examples/Fade/build-cli/Print.o b/examples/Fade/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/Fade/build-cli/Print.o differ diff --git a/examples/Fade/build-cli/Stream.o b/examples/Fade/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/Fade/build-cli/Stream.o differ diff --git a/examples/Fade/build-cli/Tone.o b/examples/Fade/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/Fade/build-cli/Tone.o differ diff --git a/examples/Fade/build-cli/USBCore.o b/examples/Fade/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/Fade/build-cli/USBCore.o differ diff --git a/examples/Fade/build-cli/WInterrupts.o b/examples/Fade/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/Fade/build-cli/WInterrupts.o differ diff --git a/examples/Fade/build-cli/WMath.o b/examples/Fade/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/Fade/build-cli/WMath.o differ diff --git a/examples/Fade/build-cli/WString.o b/examples/Fade/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/Fade/build-cli/WString.o differ diff --git a/examples/Fade/build-cli/depends.mk b/examples/Fade/build-cli/depends.mk new file mode 100644 index 0000000..c503144 --- /dev/null +++ b/examples/Fade/build-cli/depends.mk @@ -0,0 +1,11 @@ +build-cli/Fade.o: build-cli/Fade.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h diff --git a/examples/Fade/build-cli/libcore.a b/examples/Fade/build-cli/libcore.a new file mode 100644 index 0000000..dc61256 Binary files /dev/null and b/examples/Fade/build-cli/libcore.a differ diff --git a/examples/Fade/build-cli/main.o b/examples/Fade/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/Fade/build-cli/main.o differ diff --git a/examples/Fade/build-cli/new.o b/examples/Fade/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/Fade/build-cli/new.o differ diff --git a/examples/Fade/build-cli/wiring.o b/examples/Fade/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/Fade/build-cli/wiring.o differ diff --git a/examples/Fade/build-cli/wiring_analog.o b/examples/Fade/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/Fade/build-cli/wiring_analog.o differ diff --git a/examples/Fade/build-cli/wiring_digital.o b/examples/Fade/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/Fade/build-cli/wiring_digital.o differ diff --git a/examples/Fade/build-cli/wiring_pulse.o b/examples/Fade/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/Fade/build-cli/wiring_pulse.o differ diff --git a/examples/Fade/build-cli/wiring_shift.o b/examples/Fade/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/Fade/build-cli/wiring_shift.o differ diff --git a/examples/HelloWorld/HelloWorld.ino b/examples/HelloWorld/HelloWorld.ino new file mode 100644 index 0000000..e99957d --- /dev/null +++ b/examples/HelloWorld/HelloWorld.ino @@ -0,0 +1,58 @@ +/* + LiquidCrystal Library - Hello World + + Demonstrates the use a 16x2 LCD display. The LiquidCrystal + library works with all LCD displays that are compatible with the + Hitachi HD44780 driver. There are many of them out there, and you + can usually tell them by the 16-pin interface. + + This sketch prints "Hello World!" to the LCD + and shows the time. + + The circuit: + * LCD RS pin to digital pin 12 + * LCD Enable pin to digital pin 11 + * LCD D4 pin to digital pin 5 + * LCD D5 pin to digital pin 4 + * LCD D6 pin to digital pin 3 + * LCD D7 pin to digital pin 2 + * LCD R/W pin to ground + * 10K resistor: + * ends to +5V and ground + * wiper to LCD VO pin (pin 3) + + Library originally added 18 Apr 2008 + by David A. Mellis + library modified 5 Jul 2009 + by Limor Fried (http://www.ladyada.net) + example added 9 Jul 2009 + by Tom Igoe + modified 22 Nov 2010 + by Tom Igoe + + This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/LiquidCrystal + */ + +// include the library code: +#include + +// initialize the library with the numbers of the interface pins +LiquidCrystal lcd(12, 11, 5, 4, 3, 2); + +void setup() { + // set up the LCD's number of columns and rows: + lcd.begin(16, 2); + // Print a message to the LCD. + lcd.print("hello, world!"); +} + +void loop() { + // set the cursor to column 0, line 1 + // (note: line 1 is the second row, since counting begins with 0): + lcd.setCursor(0, 1); + // print the number of seconds since reset: + lcd.print(millis()/1000); +} + diff --git a/examples/HelloWorld/Makefile b/examples/HelloWorld/Makefile new file mode 100644 index 0000000..591d575 --- /dev/null +++ b/examples/HelloWorld/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = LiquidCrystal + +include ../../arduino-mk/Arduino.mk \ No newline at end of file diff --git a/examples/HelloWorld/build-cli/CDC.o b/examples/HelloWorld/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/HelloWorld/build-cli/CDC.o differ diff --git a/examples/HelloWorld/build-cli/HID.o b/examples/HelloWorld/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/HelloWorld/build-cli/HID.o differ diff --git a/examples/HelloWorld/build-cli/HardwareSerial.o b/examples/HelloWorld/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/HelloWorld/build-cli/HardwareSerial.o differ diff --git a/examples/HelloWorld/build-cli/HelloWorld.cpp b/examples/HelloWorld/build-cli/HelloWorld.cpp new file mode 100644 index 0000000..45b8bc9 --- /dev/null +++ b/examples/HelloWorld/build-cli/HelloWorld.cpp @@ -0,0 +1,59 @@ +#include +/* + LiquidCrystal Library - Hello World + + Demonstrates the use a 16x2 LCD display. The LiquidCrystal + library works with all LCD displays that are compatible with the + Hitachi HD44780 driver. There are many of them out there, and you + can usually tell them by the 16-pin interface. + + This sketch prints "Hello World!" to the LCD + and shows the time. + + The circuit: + * LCD RS pin to digital pin 12 + * LCD Enable pin to digital pin 11 + * LCD D4 pin to digital pin 5 + * LCD D5 pin to digital pin 4 + * LCD D6 pin to digital pin 3 + * LCD D7 pin to digital pin 2 + * LCD R/W pin to ground + * 10K resistor: + * ends to +5V and ground + * wiper to LCD VO pin (pin 3) + + Library originally added 18 Apr 2008 + by David A. Mellis + library modified 5 Jul 2009 + by Limor Fried (http://www.ladyada.net) + example added 9 Jul 2009 + by Tom Igoe + modified 22 Nov 2010 + by Tom Igoe + + This example code is in the public domain. + + http://www.arduino.cc/en/Tutorial/LiquidCrystal + */ + +// include the library code: +#include + +// initialize the library with the numbers of the interface pins +LiquidCrystal lcd(12, 11, 5, 4, 3, 2); + +void setup() { + // set up the LCD's number of columns and rows: + lcd.begin(16, 2); + // Print a message to the LCD. + lcd.print("hello, world!"); +} + +void loop() { + // set the cursor to column 0, line 1 + // (note: line 1 is the second row, since counting begins with 0): + lcd.setCursor(0, 1); + // print the number of seconds since reset: + lcd.print(millis()/1000); +} + diff --git a/examples/HelloWorld/build-cli/HelloWorld.d b/examples/HelloWorld/build-cli/HelloWorld.d new file mode 100644 index 0000000..13a59ad --- /dev/null +++ b/examples/HelloWorld/build-cli/HelloWorld.d @@ -0,0 +1,13 @@ +build-cli/HelloWorld.o: build-cli/HelloWorld.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h diff --git a/examples/HelloWorld/build-cli/HelloWorld.elf b/examples/HelloWorld/build-cli/HelloWorld.elf new file mode 100755 index 0000000..14540a5 Binary files /dev/null and b/examples/HelloWorld/build-cli/HelloWorld.elf differ diff --git a/examples/HelloWorld/build-cli/HelloWorld.hex b/examples/HelloWorld/build-cli/HelloWorld.hex new file mode 100644 index 0000000..eafc8c1 --- /dev/null +++ b/examples/HelloWorld/build-cli/HelloWorld.hex @@ -0,0 +1,159 @@ +:100000000C9462000C948A000C948A000C948A0070 +:100010000C948A000C948A000C948A000C948A0038 +:100020000C948A000C948A000C948A000C948A0028 +:100030000C948A000C948A000C948A000C948A0018 +:100040000C94CF000C948A000C948A000C948A00C3 +:100050000C948A000C948A000C948A000C948A00F8 +:100060000C948A000C948A000000000024002700F1 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C00000008F0011241FBECFEFD8E0DEBFCDBFF0 +:1000D00011E0A0E0B1E0E0ECF9E002C005900D9283 +:1000E000AE31B107D9F711E0AEE1B1E001C01D9228 +:1000F000AC33B107E1F710E0C4ECD0E004C02297C4 +:10010000FE010E94DA04C23CD107C9F70E941E0218 +:100110000C948C000C940000F8940C94DE04CF92A4 +:10012000EF920F938EE191E06CE04BE025E004E06C +:1001300053E0E52E32E0C32E0E94E4030F91EF90CE +:10014000CF9008950F931F930EE111E0C80160E076 +:1001500041E00E94F7020E94170128EE33E040E0E0 +:1001600050E00E94B604C801BA01A9012AE030E0BB +:100170000E940C021F910F9108950F931F930EE19F +:1001800011E0C80160E142E020E00E942E03C801B6 +:1001900060E071E00E941B021F910F9108951F9271 +:1001A0000F920FB60F9211242F933F938F939F932B +:1001B000AF93BF938091370190913801A09139019D +:1001C000B0913A0130913B010196A11DB11D232F41 +:1001D0002D5F2D3720F02D570196A11DB11D2093C5 +:1001E0003B018093370190933801A0933901B0937C +:1001F0003A018091330190913401A0913501B09181 +:1002000036010196A11DB11D8093330190933401F5 +:10021000A0933501B0933601BF91AF919F918F911B +:100220003F912F910F900FBE0F901F9018958FB791 +:10023000F894209137013091380140913901509163 +:100240003A018FBFB901CA010895019739F0880FAB +:10025000991F880F991F02970197F1F708957894D5 +:1002600084B5826084BD84B5816084BD85B58260BB +:1002700085BD85B5816085BDEEE6F0E08081816059 +:100280008083E1E8F0E01082808182608083808159 +:1002900081608083E0E8F0E0808181608083E1EB31 +:1002A000F0E0808184608083E0EBF0E08081816019 +:1002B0008083EAE7F0E080818460808380818260CF +:1002C00080838081816080838081806880831092B8 +:1002D000C1000895CF92DF92EF92FF920F931F9388 +:1002E000CF93DF937C016B018A01C0E0D0E00FC0A7 +:1002F000D6016D916D01D701ED91FC910190F081D6 +:10030000E02DC7010995C80FD91F015010400115F4 +:10031000110571F7CE01DF91CF911F910F91FF90E1 +:10032000EF90DF90CF900895CF93DF93DB010D9096 +:100330000020E9F71197A61BB70BEC01E881F981C2 +:100340000280F381E02DAD010995DF91CF910895F1 +:100350004F925F927F928F929F92AF92BF92CF9275 +:10036000DF92EF92FF920F931F93DF93CF93CDB75E +:10037000DEB7A1970FB6F894DEBF0FBECDBF2C013C +:10038000742ECB01223008F42AE019A231E2C32EE8 +:10039000D12CCC0EDD1E822E9924AA24BB24672DDD +:1003A000752FA50194010E94B60479018A01C80144 +:1003B000B701A50194010E949704472D461B08949C +:1003C000C108D1084A3014F4405D01C0495CF6010F +:1003D0004083E114F1040105110521F07E2C5F2D0D +:1003E000C801DDCFC201B6010E949401A1960FB6EB +:1003F000F894DEBF0FBECDBFCF91DF911F910F915B +:10040000FF90EF90DF90CF90BF90AF909F908F9034 +:100410007F905F904F900895DC012115310541F4E4 +:10042000ED91FC910190F081E02D642F09950895E4 +:100430000E94A80108950E9494010895CF93DF932C +:100440000E942F010E94BD00C0E0D0E00E94A200E7 +:100450002097E1F30E940000F9CF0F931F938C01C6 +:10046000FC01868160E00E94430481E090E00E94EC +:100470002501F801868161E00E94430481E090E05B +:100480000E942501F801868160E00E94430484E611 +:1004900090E00E9425011F910F910895CF92DF9265 +:1004A000EF92FF920F931F93CF93DF93D82EC92E15 +:1004B000282F392FC9018C01C0E0D0E0E62EFF249F +:1004C000F801878161E00E941D04B7010C2E02C073 +:1004D000759567950A94E2F76170F80187810E942B +:1004E000430421960F5F1F4FC830D10549F78D2D6A +:1004F0009C2D0E942D02DF91CF911F910F91FF90B3 +:10050000EF90DF90CF900895CF92DF92EF92FF921D +:100510000F931F93CF93DF93D82EC92E282F392FF7 +:10052000C9018C01C0E0D0E0E62EFF24F8018781EC +:1005300061E00E941D04B7010C2E02C075956795FD +:100540000A94E2F76170F80187810E9443042196C2 +:100550000F5F1F4FC430D10549F78D2D9C2D0E9490 +:100560002D02DF91CF911F910F91FF90EF90DF90BF +:10057000CF9008951F93CF93DF93EC01162F8C81BA +:10058000642F0E9443048D818F3F19F060E00E9428 +:1005900043048F8584FF05C0CE01612F0E944E0267 +:1005A0000EC0612F70E084E0759567958A95E1F73C +:1005B000CE010E948402CE01612F0E948402DF914D +:1005C000CF911F91089541E00E94BA0281E090E02E +:1005D000089540E00E94BA020895FC016089862FC8 +:1005E0008460808B6C60CF010E94E9020895DF93E4 +:1005F000CF93CDB7DEB728970FB6F894DEBF0FBE06 +:10060000CDBF9C01FE013196A6E1B1E088E00D90DE +:1006100001928150E1F7F9018389481710F0482FC2 +:100620004150E42FF0E0EE0FFF1FEC0FFD1F818122 +:10063000680F6068C9010E94E90228960FB6F89415 +:10064000DEBF0FBECDBFCF91DF91089561E00E9464 +:10065000E90280ED97E00E9425010895CF93DF9392 +:10066000EC01423018F08F8588608F874B8B1C8A95 +:10067000222329F0413019F48F8584608F8780E52B +:1006800093EC0E9425018C8160E00E9443048E81DE +:1006900060E00E9443048D818F3F19F060E00E946A +:1006A00043046F8564FD1DC0CE0163E00E94840297 +:1006B00084E991E10E942501CE0163E00E94840259 +:1006C00084E991E10E942501CE0163E00E94840249 +:1006D00086E990E00E942501CE0162E00E9484023A +:1006E00016C06062CE010E94E90284E991E10E9495 +:1006F00025016F856062CE010E94E90286E990E0E3 +:100700000E9425016F856062CE010E94E9026F851B +:100710006062CE010E94E90284E0888BCE010E94D3 +:10072000ED02CE010E94260382E0898BCE0166E0B5 +:100730000E94E902DF91CF9108956F927F928F928C +:10074000AF92CF92EF920F931F93DF93CF93CDB7DA +:10075000DEB73C01162F842FF301448325830683E3 +:10076000E782C086A18682869D8593879E85948731 +:100770009F8595879889968761E00E941D04F30103 +:1007800085818F3F19F061E00E941D04F30186818D +:1007900061E00E941D04112319F0F301178603C0C4 +:1007A00080E1F3018787C30160E141E020E00E941E +:1007B0002E03CF91DF911F910F91EF90CF90AF90CB +:1007C0008F907F906F9008958F92AF92CF92EF921B +:1007D0000F931F93CF93DF93DC01362F542F722F8B +:1007E000102FAE2C8C2C13961C921E92129782E125 +:1007F00091E011969C938E9300D000D0EDB7FEB798 +:100800003196CDB7DEB71982118212821382CD01E3 +:1008100061E0432F2FEF052FE72EC12E0E949D038D +:100820000F900F900F900F90DF91CF911F910F912C +:10083000EF90CF90AF908F900895482F50E0CA016D +:1008400086569F4FFC0124914A575F4FFA018491CD +:100850008823C1F0E82FF0E0EE0FFF1FE859FF4FAB +:10086000A591B491662341F49FB7F8948C9120959B +:1008700082238C939FBF08959FB7F8948C91822B0D +:100880008C939FBF0895482F50E0CA0182559F4F17 +:10089000FC012491CA0186569F4FFC0194914A574E +:1008A0005F4FFA013491332309F440C0222351F100 +:1008B000233071F0243028F42130A1F0223011F5DA +:1008C00014C02630B1F02730C1F02430D9F404C070 +:1008D000809180008F7703C0809180008F7D80930E +:1008E000800010C084B58F7702C084B58F7D84BD31 +:1008F00009C08091B0008F7703C08091B0008F7DD8 +:100900008093B000E32FF0E0EE0FFF1FEE58FF4F93 +:10091000A591B4912FB7F894662321F48C9190950A +:10092000892302C08C91892B8C932FBF0895629FDD +:10093000D001739FF001829FE00DF11D649FE00DD7 +:10094000F11D929FF00D839FF00D749FF00D659F38 +:10095000F00D9927729FB00DE11DF91F639FB00D37 +:10096000E11DF91FBD01CF0111240895A1E21A2E46 +:10097000AA1BBB1BFD010DC0AA1FBB1FEE1FFF1F43 +:10098000A217B307E407F50720F0A21BB30BE40B93 +:10099000F50B661F771F881F991F1A9469F76095DA +:1009A0007095809590959B01AC01BD01CF01089594 +:1009B000EE0FFF1F0590F491E02D0994F894FFCFFE +:1009C00068656C6C6F2C20776F726C64210000007E +:0E09D0000000E3026A01000040001400540021 +:00000001FF diff --git a/examples/HelloWorld/build-cli/HelloWorld.o b/examples/HelloWorld/build-cli/HelloWorld.o new file mode 100644 index 0000000..6eca8ae Binary files /dev/null and b/examples/HelloWorld/build-cli/HelloWorld.o differ diff --git a/examples/HelloWorld/build-cli/IPAddress.o b/examples/HelloWorld/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/HelloWorld/build-cli/IPAddress.o differ diff --git a/examples/HelloWorld/build-cli/Print.o b/examples/HelloWorld/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/HelloWorld/build-cli/Print.o differ diff --git a/examples/HelloWorld/build-cli/Stream.o b/examples/HelloWorld/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/HelloWorld/build-cli/Stream.o differ diff --git a/examples/HelloWorld/build-cli/Tone.o b/examples/HelloWorld/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/HelloWorld/build-cli/Tone.o differ diff --git a/examples/HelloWorld/build-cli/USBCore.o b/examples/HelloWorld/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/HelloWorld/build-cli/USBCore.o differ diff --git a/examples/HelloWorld/build-cli/WInterrupts.o b/examples/HelloWorld/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/HelloWorld/build-cli/WInterrupts.o differ diff --git a/examples/HelloWorld/build-cli/WMath.o b/examples/HelloWorld/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/HelloWorld/build-cli/WMath.o differ diff --git a/examples/HelloWorld/build-cli/WString.o b/examples/HelloWorld/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/HelloWorld/build-cli/WString.o differ diff --git a/examples/HelloWorld/build-cli/a.out.elf b/examples/HelloWorld/build-cli/a.out.elf new file mode 100755 index 0000000..14540a5 Binary files /dev/null and b/examples/HelloWorld/build-cli/a.out.elf differ diff --git a/examples/HelloWorld/build-cli/depends.mk b/examples/HelloWorld/build-cli/depends.mk new file mode 100644 index 0000000..13a59ad --- /dev/null +++ b/examples/HelloWorld/build-cli/depends.mk @@ -0,0 +1,13 @@ +build-cli/HelloWorld.o: build-cli/HelloWorld.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/LiquidCrystal.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h diff --git a/examples/HelloWorld/build-cli/libcore.a b/examples/HelloWorld/build-cli/libcore.a new file mode 100644 index 0000000..5fcfc12 Binary files /dev/null and b/examples/HelloWorld/build-cli/libcore.a differ diff --git a/examples/HelloWorld/build-cli/libs/LiquidCrystal/LiquidCrystal.o b/examples/HelloWorld/build-cli/libs/LiquidCrystal/LiquidCrystal.o new file mode 100644 index 0000000..a0f46f5 Binary files /dev/null and b/examples/HelloWorld/build-cli/libs/LiquidCrystal/LiquidCrystal.o differ diff --git a/examples/HelloWorld/build-cli/main.o b/examples/HelloWorld/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/HelloWorld/build-cli/main.o differ diff --git a/examples/HelloWorld/build-cli/new.o b/examples/HelloWorld/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/HelloWorld/build-cli/new.o differ diff --git a/examples/HelloWorld/build-cli/wiring.o b/examples/HelloWorld/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/HelloWorld/build-cli/wiring.o differ diff --git a/examples/HelloWorld/build-cli/wiring_analog.o b/examples/HelloWorld/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/HelloWorld/build-cli/wiring_analog.o differ diff --git a/examples/HelloWorld/build-cli/wiring_digital.o b/examples/HelloWorld/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/HelloWorld/build-cli/wiring_digital.o differ diff --git a/examples/HelloWorld/build-cli/wiring_pulse.o b/examples/HelloWorld/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/HelloWorld/build-cli/wiring_pulse.o differ diff --git a/examples/HelloWorld/build-cli/wiring_shift.o b/examples/HelloWorld/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/HelloWorld/build-cli/wiring_shift.o differ diff --git a/examples/WebServer/Makefile b/examples/WebServer/Makefile new file mode 100644 index 0000000..56e422f --- /dev/null +++ b/examples/WebServer/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = Ethernet Ethernet/utility SPI + +include ../../arduino-mk/Arduino.mk \ No newline at end of file diff --git a/examples/WebServer/WebServer.ino b/examples/WebServer/WebServer.ino new file mode 100644 index 0000000..fb2a1b9 --- /dev/null +++ b/examples/WebServer/WebServer.ino @@ -0,0 +1,82 @@ +/* + Web Server + + A simple web server that shows the value of the analog input pins. + using an Arduino Wiznet Ethernet shield. + + Circuit: + * Ethernet shield attached to pins 10, 11, 12, 13 + * Analog inputs attached to pins A0 through A5 (optional) + + created 18 Dec 2009 + by David A. Mellis + modified 4 Sep 2010 + by Tom Igoe + + */ + +#include +#include + +// Enter a MAC address and IP address for your controller below. +// The IP address will be dependent on your local network: +byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; +IPAddress ip(192,168,1, 178); + +// Initialize the Ethernet server library +// with the IP address and port you want to use +// (port 80 is default for HTTP): +EthernetServer server(80); + +void setup() +{ + // start the Ethernet connection and the server: + Ethernet.begin(mac, ip); + server.begin(); +} + +void loop() +{ + // listen for incoming clients + EthernetClient client = server.available(); + if (client) { + // an http request ends with a blank line + boolean currentLineIsBlank = true; + while (client.connected()) { + if (client.available()) { + char c = client.read(); + // if you've gotten to the end of the line (received a newline + // character) and the line is blank, the http request has ended, + // so you can send a reply + if (c == '\n' && currentLineIsBlank) { + // send a standard http response header + client.println("HTTP/1.1 200 OK"); + client.println("Content-Type: text/html"); + client.println(); + + // output the value of each analog input pin + for (int analogChannel = 0; analogChannel < 6; analogChannel++) { + client.print("analog input "); + client.print(analogChannel); + client.print(" is "); + client.print(analogRead(analogChannel)); + client.println("
"); + } + break; + } + if (c == '\n') { + // you're starting a new line + currentLineIsBlank = true; + } + else if (c != '\r') { + // you've gotten a character on the current line + currentLineIsBlank = false; + } + } + } + // give the web browser time to receive the data + delay(1); + // close the connection: + client.stop(); + } +} diff --git a/examples/WebServer/build-cli/CDC.o b/examples/WebServer/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/WebServer/build-cli/CDC.o differ diff --git a/examples/WebServer/build-cli/HID.o b/examples/WebServer/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/WebServer/build-cli/HID.o differ diff --git a/examples/WebServer/build-cli/HardwareSerial.o b/examples/WebServer/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/WebServer/build-cli/HardwareSerial.o differ diff --git a/examples/WebServer/build-cli/IPAddress.o b/examples/WebServer/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/WebServer/build-cli/IPAddress.o differ diff --git a/examples/WebServer/build-cli/Print.o b/examples/WebServer/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/WebServer/build-cli/Print.o differ diff --git a/examples/WebServer/build-cli/Stream.o b/examples/WebServer/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/WebServer/build-cli/Stream.o differ diff --git a/examples/WebServer/build-cli/Tone.o b/examples/WebServer/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/WebServer/build-cli/Tone.o differ diff --git a/examples/WebServer/build-cli/USBCore.o b/examples/WebServer/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/WebServer/build-cli/USBCore.o differ diff --git a/examples/WebServer/build-cli/WInterrupts.o b/examples/WebServer/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/WebServer/build-cli/WInterrupts.o differ diff --git a/examples/WebServer/build-cli/WMath.o b/examples/WebServer/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/WebServer/build-cli/WMath.o differ diff --git a/examples/WebServer/build-cli/WString.o b/examples/WebServer/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/WebServer/build-cli/WString.o differ diff --git a/examples/WebServer/build-cli/WebServer.cpp b/examples/WebServer/build-cli/WebServer.cpp new file mode 100644 index 0000000..8ccdf51 --- /dev/null +++ b/examples/WebServer/build-cli/WebServer.cpp @@ -0,0 +1,83 @@ +#include +/* + Web Server + + A simple web server that shows the value of the analog input pins. + using an Arduino Wiznet Ethernet shield. + + Circuit: + * Ethernet shield attached to pins 10, 11, 12, 13 + * Analog inputs attached to pins A0 through A5 (optional) + + created 18 Dec 2009 + by David A. Mellis + modified 4 Sep 2010 + by Tom Igoe + + */ + +#include +#include + +// Enter a MAC address and IP address for your controller below. +// The IP address will be dependent on your local network: +byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; +IPAddress ip(192,168,1, 178); + +// Initialize the Ethernet server library +// with the IP address and port you want to use +// (port 80 is default for HTTP): +EthernetServer server(80); + +void setup() +{ + // start the Ethernet connection and the server: + Ethernet.begin(mac, ip); + server.begin(); +} + +void loop() +{ + // listen for incoming clients + EthernetClient client = server.available(); + if (client) { + // an http request ends with a blank line + boolean currentLineIsBlank = true; + while (client.connected()) { + if (client.available()) { + char c = client.read(); + // if you've gotten to the end of the line (received a newline + // character) and the line is blank, the http request has ended, + // so you can send a reply + if (c == '\n' && currentLineIsBlank) { + // send a standard http response header + client.println("HTTP/1.1 200 OK"); + client.println("Content-Type: text/html"); + client.println(); + + // output the value of each analog input pin + for (int analogChannel = 0; analogChannel < 6; analogChannel++) { + client.print("analog input "); + client.print(analogChannel); + client.print(" is "); + client.print(analogRead(analogChannel)); + client.println("
"); + } + break; + } + if (c == '\n') { + // you're starting a new line + currentLineIsBlank = true; + } + else if (c != '\r') { + // you've gotten a character on the current line + currentLineIsBlank = false; + } + } + } + // give the web browser time to receive the data + delay(1); + // close the connection: + client.stop(); + } +} diff --git a/examples/WebServer/build-cli/WebServer.d b/examples/WebServer/build-cli/WebServer.d new file mode 100644 index 0000000..ec93e0e --- /dev/null +++ b/examples/WebServer/build-cli/WebServer.d @@ -0,0 +1,21 @@ +build-cli/WebServer.o: build-cli/WebServer.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/Ethernet.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/IPAddress.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/EthernetClient.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/IPAddress.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/EthernetServer.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Server.h diff --git a/examples/WebServer/build-cli/WebServer.elf b/examples/WebServer/build-cli/WebServer.elf new file mode 100755 index 0000000..4c68f99 Binary files /dev/null and b/examples/WebServer/build-cli/WebServer.elf differ diff --git a/examples/WebServer/build-cli/WebServer.hex b/examples/WebServer/build-cli/WebServer.hex new file mode 100644 index 0000000..0a52f4b --- /dev/null +++ b/examples/WebServer/build-cli/WebServer.hex @@ -0,0 +1,636 @@ +:100000000C9469000C9491000C9491000C94910054 +:100010000C9491000C9491000C9491000C9491001C +:100020000C9491000C9491000C9491000C9491000C +:100030000C9491000C9491000C9491000C949100FC +:100040000C946C010C9491000C9491000C94910010 +:100050000C9491000C9491000C9491000C949100DC +:100060000C9491000C9491000000000024002700E3 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C00000009600FE02B00453064808220A1D10E4 +:1000D0007F1011241FBECFEFD8E0DEBFCDBF11E0EF +:1000E000A0E0B1E0ECE0F7E202C005900D92AC397F +:1000F000B107D9F712E0ACE9B1E001C01D92A1301F +:10010000B107E1F710E0C2EDD0E004C02297FE0194 +:100110000E948013C23CD107C9F70E9490040C943E +:1001200093000C940000F8940C9484130F9388EAC5 +:1001300091E060E040E020E000E00E94F2028CE903 +:1001400091E060EC48EA21E002EB0E94F20282EAD0 +:1001500091E060E570E00E9426080F910895EF920B +:10016000FF920F931F93DF93CF93CDB7DEB72D97F9 +:100170000FB6F894DEBF0FBECDBF8E010F5F1F4FCD +:10018000C80162EA71E00E941409C8010E944B068E +:10019000882309F467C0FF24F394C801102F092FA6 +:1001A00050C0812F902F0E941607892B09F449C057 +:1001B000812F902F0E94FB068A3009F03FC0FF205C +:1001C00019F4FF24F3943DC0812F902F60E071E07B +:1001D0000E947D04812F902F60E171E00E947D04D8 +:1001E000812F902F0E946E0300E010E07E010894A2 +:1001F000E11CF11CC70168E271E00E947A04C701AA +:10020000B8014AE050E00E946704C70166E371E06C +:100210000E947A04802F0E945602BC01C7014AE066 +:1002200050E00E946704C7016BE371E00E947D0407 +:100230000F5F1F4F06301105E9F60AC08D3009F037 +:10024000FF24812F902F0E946B06882309F0A9CFED +:1002500061E070E080E090E00E94C201CE01019672 +:100260000E948F062D960FB6F894DEBF0FBECDBF4D +:10027000CF91DF911F910F91FF90EF900895DF9341 +:10028000CF9300D000D000D0CDB7DEB78FE491E09F +:100290009A83898380919E0190919F01A091A001F2 +:1002A000B091A1018B839C83AD83BE8385EC91E0EB +:1002B00062E471E0AE014F5F5F4F0E94D30582EAB6 +:1002C00091E00E948C0926960FB6F894DEBF0FBE0F +:1002D000CDBFCF91DF9108951F920F920FB60F926D +:1002E00011242F933F938F939F93AF93BF9380914C +:1002F000B2019091B301A091B401B091B5013091D8 +:10030000B6010196A11DB11D232F2D5F2D3720F0C1 +:100310002D570196A11DB11D2093B6018093B20106 +:100320009093B301A093B401B093B5018091AE0155 +:100330009091AF01A091B001B091B1010196A11DC2 +:10034000B11D8093AE019093AF01A093B001B09323 +:10035000B101BF91AF919F918F913F912F910F90DC +:100360000FBE0F901F9018958FB7F8942091B2018F +:100370003091B3014091B4015091B5018FBFB901E3 +:10038000CA0108959B01AC017FB7F8948091AE013A +:100390009091AF01A091B001B091B10166B5A89B59 +:1003A00005C06F3F19F00196A11DB11D7FBFBA2F87 +:1003B000A92F982F8827860F911DA11DB11D62E0DE +:1003C000880F991FAA1FBB1F6A95D1F7BC012DC0CA +:1003D000FFB7F8948091AE019091AF01A091B00168 +:1003E000B091B101E6B5A89B05C0EF3F19F00196A9 +:1003F000A11DB11DFFBFBA2FA92F982F88278E0FDF +:10040000911DA11DB11DE2E0880F991FAA1FBB1FFE +:10041000EA95D1F7861B970B885E9340C8F221506E +:1004200030404040504068517C4F21153105410516 +:10043000510571F60895789484B5826084BD84B5C1 +:10044000816084BD85B5826085BD85B5816085BDCF +:10045000EEE6F0E0808181608083E1E8F0E01082E8 +:10046000808182608083808181608083E0E8F0E029 +:10047000808181608083E1EBF0E080818460808313 +:10048000E0EBF0E0808181608083EAE7F0E080814A +:1004900084608083808182608083808181608083AA +:1004A0008081806880831092C1000895982F8E30DB +:1004B00008F09E509770809148018295880F880FB0 +:1004C000807C892B80937C0080917A00806480936B +:1004D0007A0080917A0086FDFCCF209178004091CF +:1004E0007900942F80E030E0282B392BC901089542 +:1004F000482F50E0CA0186569F4FFC0124914A576D +:100500005F4FFA0184918823C1F0E82FF0E0EE0FED +:10051000FF1FE859FF4FA591B491662341F49FB79F +:10052000F8948C91209582238C939FBF08959FB758 +:10053000F8948C91822B8C939FBF0895482F50E0A4 +:10054000CA0182559F4FFC012491CA0186569F4FD4 +:10055000FC0194914A575F4FFA013491332309F417 +:1005600040C0222351F1233071F0243028F421308F +:10057000A1F0223011F514C02630B1F02730C1F0BF +:100580002430D9F404C0809180008F7703C080911B +:1005900080008F7D8093800010C084B58F7702C06B +:1005A00084B58F7D84BD09C08091B0008F7703C072 +:1005B0008091B0008F7D8093B000E32FF0E0EE0FCC +:1005C000FF1FEE58FF4FA591B4912FB7F894662303 +:1005D00021F48C919095892302C08C91892B8C9366 +:1005E0002FBF08950F93FC018FE491E091838083E6 +:1005F00062834383248305830F9108958FE491E000 +:100600009093B8018093B7011092B9011092BA018A +:100610001092BB011092BC0108958F929F92AF92ED +:10062000BF92CF92DF92EF92FF920F931F93CF93DF +:10063000DF934C016B017C01AA24BB24C0E0D0E015 +:10064000C601F70162814AE050E00E9415048C0166 +:10065000C6016EE20E946603080F191FA00EB11EAC +:1006600021960894E11CF11CC330D10549F7C6015D +:10067000F40165814AE050E00E9415049501280FBD +:10068000391FC901DF91CF911F910F91FF90EF901A +:10069000DF90CF90BF90AF909F908F9008959C0176 +:1006A000FB0180819181A281B381F90182839383CF +:1006B000A483B583C9010895FC018FE491E091837F +:1006C000808312821382148215820895DC01ED91D9 +:1006D000FC910190F081E02D09950895EF92FF9231 +:1006E0000F931F938C01DC01ED91FC910190F0813F +:1006F000E02D6DE009957C01D801ED91FC91019010 +:10070000F081E02DC8016AE009959C012E0D3F1D86 +:10071000C9011F910F91FF90EF900895CF93DF9340 +:10072000DB010D900020E9F71197A61BB70BEC0138 +:10073000E881F9810280F381E02DAD010995DF9117 +:10074000CF9108954F925F927F928F929F92AF9236 +:10075000BF92CF92DF92EF92FF920F931F93DF939E +:10076000CF93CDB7DEB7A1970FB6F894DEBF0FBE1B +:10077000CDBF2C01742ECB01223008F42AE019A23F +:1007800031E2C32ED12CCC0EDD1E822E9924AA2458 +:10079000BB24672D752FA50194010E945C1379017C +:1007A0008A01C801B701A50194010E943D13472D9C +:1007B000461B0894C108D1084A3014F4405D01C0BA +:1007C000495CF6014083E114F1040105110521F0B3 +:1007D0007E2C5F2DC801DDCFC201B6010E948E03C1 +:1007E000A1960FB6F894DEBF0FBECDBFCF91DF91BB +:1007F0001F910F91FF90EF90DF90CF90BF90AF903F +:100800009F908F907F905F904F900895DC0121150D +:10081000310541F4ED91FC910190F081E02D642FC0 +:10082000099508950E94A2030895EF92FF920F93F5 +:100830001F939A01E62EFF2400E010E0B801A70103 +:100840000E9406041F910F91FF90EF900895CF92A0 +:10085000DF92EF92FF920F931F93CF93DF93EC0100 +:100860006A017B012115310541F4E881F98101908C +:10087000F081E02D642F09951FC02A303105D1F495 +:1008800077FF17C0E881F9810190F081E02D6DE2DA +:1008900009958C0144275527BA014C195D096E0949 +:1008A0007F09CE012AE00E94A2039801280F391F78 +:1008B00004C02AE00E94A2039C01C901DF91CF91EC +:1008C0001F910F91FF90EF90DF90CF900895EF92DE +:1008D000FF920F931F937B019A010027F7FC00956D +:1008E000102FB801A7010E9427041F910F91FF90BC +:1008F000EF9008950E948E030895EF92FF920F9358 +:100900001F937C010E948E038C01C7010E946E031D +:10091000080F191FC8011F910F91FF90EF900895C4 +:10092000CF93DF930E941B020E943F01C0E0D0E002 +:100930000E94AF002097E1F30E940000F9CFDB0195 +:10094000FC012FE431E03183208312962D913D91FB +:100950004D915C9115972283338344835583089589 +:100960000F938BEC91E060E040E020E000E00E941B +:10097000F20285EC91E00E945C030F9108956F9262 +:100980007F928F929F92AF92BF92CF92DF92EF921F +:10099000FF920F931F933C015B016A01490185EEB1 +:1009A00091E00E94CC0F89E090E0B50146E050E074 +:1009B0000E94EA0D82E090E0C80ED91E8FE090E020 +:1009C000B60144E050E00E94EA0D0E5F1F4F81E047 +:1009D00090E0B80144E050E00E94EA0DE2E0F0E06F +:1009E000EE0EFF1E85E090E0B70144E050E00E946B +:1009F000EA0DF40182819381A481B581F3018283A0 +:100A00009383A483B5831F910F91FF90EF90DF90A4 +:100A1000CF90BF90AF909F908F907F906F900895F0 +:100A20006F927F928F929F92AF92BF92CF92DF92FE +:100A3000EF92FF920F931F93DF93CF93CDB7DEB763 +:100A40006E970FB6F894DEBF0FBECDBF4C013B01D1 +:100A50007A0169015801CE0101966FEF4FEF2FEF38 +:100A600000E00E94F2022FE431E038872F83F70183 +:100A700082819381A481B58189879A87AB87BC875E +:100A80003E872D87F60182819381A481B5818F876E +:100A9000988BA98BBA8B3C8B2B8BF5018281938130 +:100AA000A481B5818D8B9E8BAF8BB88F3A8F298FA8 +:100AB0008B819C81AD81BE818B8F9C8FAD8FBE8FD2 +:100AC000C401B301AE01495F5F4F9E01235F3F4FF9 +:100AD0008E010D5E1F4FE9E1EE2EF12CEC0EFD1E96 +:100AE0000E94BF046E960FB6F894DEBF0FBECDBF56 +:100AF000CF91DF911F910F91FF90EF90DF90CF90FA +:100B0000BF90AF909F908F907F906F9008950F93BC +:100B10001F93DF93CF93CDB7DEB768970FB6F894E6 +:100B2000DEBF0FBECDBFFA01D901228133814481DE +:100B300055812B833C834D835E83EFE4F1E0F8879E +:100B4000EF8329873A874B875C87FE87ED8712966C +:100B50002D913D914D915C9115972F87388B498B45 +:100B60005A8BFC8BEB8B21E02E832B813C814D81BA +:100B70005E812D8B3E8B4F8B588FAE01495F5F4F4F +:100B80009E01235F3F4F8E010D5E1F4F0E94100597 +:100B900068960FB6F894DEBF0FBECDBFCF91DF9140 +:100BA0001F910F910895DF93CF93CDB7DEB7629772 +:100BB0000FB6F894DEBF0FBECDBFFA01228133819C +:100BC000448155812B833C834D835E83EFE4F1E0C8 +:100BD000F887EF8329873A874B875C87FE87ED8705 +:100BE00021E02E832B813C814D815E812F87388BC4 +:100BF000498B5A8BAE01495F5F4F9E01235F3F4F88 +:100C00000E94870562960FB6F894DEBF0FBECDBF77 +:100C1000CF91DF910895FC011382128288EE93E058 +:100C2000A0E0B0E084839583A683B78385E591E057 +:100C30009183808364870895DF93CF930F92CDB71C +:100C4000DEB7FC016983A081B18112962D913C91A0 +:100C50001397BE016F5F7F4F41E050E0F9010995A6 +:100C60000F90CF91DF910895CF93DF93EC0107C0F0 +:100C7000E881F9810680F781E02DCE010995E881B0 +:100C8000F9810480F581E02DCE010995892B81F74A +:100C9000DF91CF91089520E0FC018485843009F034 +:100CA00021E0822F08950F9381ED91E060E040E014 +:100CB00020E000E00E94F2020F910895FC0184857B +:100CC000843011F480E00895982F80E08D5F9B4F71 +:100CD0000E94110E0895CF93DF93EC018C85843030 +:100CE00011F480E019C0CE010E945E06843191F0BB +:100CF000882381F0883171F08C3151F4E881F981D9 +:100D00000480F581E02DCE01099520E0892B19F0B2 +:100D100021E001C020E0822FDF91CF910895EF9272 +:100D2000FF920F931F93CF93DF93EC018C85843058 +:100D300089F10E94C60B0E94B4017B018C01CE0197 +:100D40000E945E06882301F10E94B4016E197F099A +:100D5000800B910B685E734080409040A8F461E086 +:100D600070E080E090E00E94C201E9CF8C850E9493 +:100D7000180CEC85F0E0EE0FFF1FE354FE4F1182DC +:100D8000108284E08C8706C0CE010E945E06882314 +:100D900081F3ECCFDF91CF911F910F91FF90EF90F6 +:100DA00008950F931F93DF93CF930F92CDB7DEB7C4 +:100DB0008C01DC01ED91FC910480F581E02D099519 +:100DC000892B19F42FEF3FEF0AC0F8018485BE018B +:100DD0006F5F7F4F0E947D0D8981282F30E0C90110 +:100DE0000F90CF91DF911F910F910895FC018485A1 +:100DF0000E948C0D0895DF93CF930F92CDB7DEB78D +:100E0000FC018485BE016F5F7F4F41E050E00E948E +:100E10008C0D892B19F42FEF3FEF03C08981282F08 +:100E200030E0C9010F90CF91DF910895FC016485F6 +:100E3000643019F420E030E005C085EE91E00E94B6 +:100E4000C00E9C01C90108950F931F93CF93DF93A8 +:100E50008C01EA01FC018485843019F481E090E082 +:100E600007C00E94260D892B39F481E090E0F8013B +:100E700093838283C0E0D0E0CE01DF91CF911F91B8 +:100E80000F910895AF92BF92CF92DF92EF92FF92AF +:100E90000F931F93CF93DF937C016B015A01FC01E9 +:100EA0008485843009F054C0C0E0D0E003E014E051 +:100EB000C8010E94110E882311F0883119F4F7013E +:100EC000C48706C0219600501F4FC430D10581F75A +:100ED000F70124852430E1F18091490190914A0184 +:100EE000019690934A0180934901892B31F480E067 +:100EF00094E090934A0180934901409149015091B7 +:100F00004A01822F61E020E00E94570C82E090E0CD +:100F1000C80ED91EF7018485B601A5010E94BB0C3D +:100F200009C061E070E080E090E00E94C201C7016A +:100F30000E945E06882321F484E0F701848708C0BC +:100F4000C7010E945E06873161F721E030E002C0F0 +:100F500020E030E0C901DF91CF911F910F91FF9008 +:100F6000EF90DF90CF90BF90AF9008956F927F92F7 +:100F70008F929F92AF92BF92CF92DF92EF92FF92A9 +:100F80000F931F93DF93CF93CDB7DEB7E3970FB6E1 +:100F9000F894DEBF0FBECDBF4C015B013A0193E177 +:100FA000E92EF12CEC0EFD1EC7010E945C03CE0160 +:100FB0004B960E94EB0A6E010894C11CD11CC6011D +:100FC0000E945C038E01095F1F4FC80165EC71E050 +:100FD0000E949F04C701B8010E942810C701B501F3 +:100FE000A6010E94A7129C0181309105C9F4D40189 +:100FF000ED91FC910484F585E02D8FE491E09E87CE +:101000008D878B819C81AD81BE818F87988BA98BC9 +:10101000BA8BC401BE01635F7F4FA30109959C0198 +:10102000C901E3960FB6F894DEBF0FBECDBFCF91D6 +:10103000DF911F910F91FF90EF90DF90CF90BF90C5 +:10104000AF909F908F907F906F900895FC011382D6 +:10105000128281E791E09183808375836483089590 +:10106000DF93CF930F92CDB7DEB7FC016983A081E8 +:10107000B18112962D913C911397BE016F5F7F4F06 +:1010800041E050E0F90109950F90CF91DF9108956B +:101090000F9387ED91E060E040E020E000E00E94E7 +:1010A000F2020F9108958F929F92BF92CF92DF929A +:1010B000EF92FF920F931F93DF93CF93CDB7DEB7DD +:1010C0002D970FB6F894DEBF0FBECDBF7C010DEBA0 +:1010D00011E088249924BB246E010894C11CD11C02 +:1010E000C6016B2D0E940B06D8012D913C91F70192 +:1010F0008481958128173907B1F4C6010E945E06E4 +:10110000843121F481E0882E912C0DC0C6010E940B +:101110005E068C3141F4C6010E941607892B19F432 +:10112000C6010E948F06B3940E5F1F4FF4E0BF16F6 +:10113000B9F6892841F4D701ED91FC910480F5813D +:10114000E02DC70109952D960FB6F894DEBF0FBEAE +:10115000CDBFCF91DF911F910F91FF90EF90DF9066 +:10116000CF90BF909F908F9008954F925F926F9213 +:101170007F928F929F92AF92BF92DF92EF92FF92F7 +:101180000F931F93DF93CF93CDB7DEB72D970FB695 +:10119000F894DEBF0FBECDBF4C012B013A010E9477 +:1011A00053089DEBE92E91E0F92E00E010E0DD24DC +:1011B0005E010894A11CB11CC5016D2D0E940B0697 +:1011C000F70120813181F401848195812817390745 +:1011D00061F4C5010E945E06873139F4C501B20190 +:1011E000A3010E942407080F191FD39482E090E006 +:1011F000E80EF91E94E0D916F9F6C8012D960FB63F +:10120000F894DEBF0FBECDBFCF91DF911F910F913C +:10121000FF90EF90DF90BF90AF909F908F907F9066 +:101220006F905F904F9008959F92AF92BF92CF9230 +:10123000DF92EF92FF920F931F93DF93CF93CDB77F +:10124000DEB72D970FB6F894DEBF0FBECDBFC82E08 +:10125000992E5B01CB010E9453080DEB11E0DD24B8 +:101260007E010894E11CF11CC7016D2D0E940B0644 +:10127000F80120813181F501848195812817390792 +:1012800061F5C7010E945E06873129F0C7010E94FF +:101290005E068C3111F5C7010E941607892BE9F013 +:1012A000EC2DF92D8B819C81938382838D819E818E +:1012B000AF81B88584839583A683B78389859A8512 +:1012C000AB85BC8580879187A287B38785E591E050 +:1012D000918380838D8584870BC0D3940E5F1F4FCD +:1012E000F4E0DF1609F68C2D992D64E00E940B06C0 +:1012F0008C2D992D2D960FB6F894DEBF0FBECDBF65 +:10130000CF91DF911F910F91FF90EF90DF90CF90E1 +:10131000BF90AF909F900895CF92DF92EF92FF928F +:101320000F931F93DF93CF93CDB7DEB72D970FB6F3 +:10133000F894DEBF0FBECDBF6C0100E010E07E016F +:101340000894E11CF11CC701602F0E940B06C70125 +:101350000E945E068823B1F4F60144815581802FF6 +:1013600061E020E00E94570C802F0E94D60B000FF6 +:10137000111F03541E4FF60184819581F80191835A +:10138000808305C00F5F1F4F04301105E1F62D96D5 +:101390000FB6F894DEBF0FBECDBFCF91DF911F9186 +:1013A0000F91FF90EF90DF90CF900895DC01ED91C9 +:1013B000FC91008CF18DE02D09950895DB01FC0175 +:1013C0002FE431E03183208351962D913D914D9151 +:1013D0005C91549722833383448355830895FC01A1 +:1013E000858996890895DF93CF930F92CDB7DEB7A5 +:1013F000FC016983A081B18112962D913C911397D4 +:10140000BE016F5F7F4F41E050E0F90109950F90F9 +:10141000CF91DF910895CF93DF93EC0107C0E8816E +:10142000F9810680F781E02DCE010995E881F981E7 +:101430000480F581E02DCE010995892B81F7DF919C +:10144000CF9108950F938DED91E060E040E020E0B2 +:1014500000E00E94F2020F9108950F931F93DF9313 +:10146000CF930F92CDB7DEB78C01DC01ED91FC91EB +:101470000480F581E02D0995892B19F42FEF3FEFBA +:101480000AC0F8018485BE016F5F7F4F0E947D0D09 +:101490008981282F30E0C9010F90CF91DF911F91F2 +:1014A0000F910895FC0184850E948C0D0895DF93AF +:1014B000CF930F92CDB7DEB7FC018485BE016F5F7D +:1014C0007F4F41E050E00E948C0D892B19F42FEFE3 +:1014D0003FEF03C08981282F30E0C9010F90CF91E1 +:1014E000DF910895EF92FF920F931F93DF93CF93B5 +:1014F000CDB7DEB728970FB6F894DEBF0FBECDBFCD +:101500008C01DC01ED91FC910480F581E02D0995C1 +:10151000181619061CF020E030E026C0F80184857A +:101520007E010894E11CF11CB70148E050E00E94E4 +:101530008C0D9C0118161906BCF4C8010F96B70152 +:101540000E944F039D8180E02E81820F911DD80162 +:1015500056969C938E935597ED91FC910480F5815E +:10156000E02DC80109959C01C90128960FB6F89491 +:10157000DEBF0FBECDBFCF91DF911F910F91FF90C6 +:10158000EF9008950F931F938C01FB019A01DC01EA +:1015900057966D917C9158971C968C91AF010E9443 +:1015A000F60C9C01F8018789908D820F931F908F14 +:1015B000878BC9011F910F910895FC0184850E94BA +:1015C000F40B0895FC01108E178A6E5F7F4F84859F +:1015D0000E94900C0895FC011382128288EE93E021 +:1015E000A0E0B0E084839583A683B7838BE791E086 +:1015F0009183808384E08487CF010F960E945C03EF +:1016000008956F927F928F929F92AF92BF92CF92E6 +:10161000DF92EF92FF920F931F93DF93CF93CDB79B +:10162000DEB7E3970FB6F894DEBF0FBECDBF4C0117 +:101630005B013A0183E1E82EF12CEC0EFD1EC7019F +:101640000E945C03CE014B960E94EB0A6E01089447 +:10165000C11CD11CC6010E945C038E01095F1F4F93 +:10166000C80165EC71E00E949F04C701B8010E94A7 +:101670002810C701B501A6010E94A7129C01813064 +:101680009105C9F4D401ED91FC910088F189E02D18 +:101690008FE491E09E878D878B819C81AD81BE8197 +:1016A0008F87988BA98BBA8BC401BE01635F7F4F74 +:1016B000A30109959C01C901E3960FB6F894DEBF1A +:1016C0000FBECDBFCF91DF911F910F91FF90EF9093 +:1016D000DF90CF90BF90AF909F908F907F906F9052 +:1016E0000895CF93DF93EC018C85843061F00E94E4 +:1016F000180CEC85F0E0EE0FFF1FE354FE4F118253 +:10170000108284E08C87DF91CF910895FC0185EEF3 +:1017100091E064850E94C00E0895CF92DF92EF920F +:10172000FF920F931F93CF93DF937C016B01FC011A +:101730008485843009F5C0E0D0E003E014E0C801FE +:101740000E94110E882311F0883119F4F701C48723 +:1017500006C0219600501F4FC430D10581F7F70114 +:101760008485843049F0D686C58662E0A60120E0F3 +:101770000E94570C81E001C080E0DF91CF911F9162 +:101780000F91FF90EF90DF90CF900895682F85EE36 +:1017900091E048E050E00E94BA0F089590E0982F41 +:1017A00088278E5F9B4F0E94110E08951F93182F5C +:1017B000982F80E08D5F9B4F0E94110E833111F0B6 +:1017C00080E008C085EE91E0612F42E050E00E9489 +:1017D000BA0F81E01F91089590E0982F88278E5FBF +:1017E0009B4F0E94D00D08951F93182F85EE91E016 +:1017F000612F40E250E00E94BA0F0CC0812F0E947E +:10180000CE0B83FF07C0812F68E10E94EC0B20E024 +:1018100030E00BC0812F0E94CE0B84FFEFCF812FD1 +:1018200060E10E94EC0B21E030E0C9011F910895B6 +:101830001F93182F85EE91E0612F40E150E00E9448 +:10184000BA0F812F6FEF0E94EC0B1F910895FF924A +:101850000F931F93F62E672F082F10E00C5F1F4F7A +:10186000102F0027C80140960E94D00DC801419654 +:101870006F2D0E94D00D1F910F91FF900895FF9240 +:101880000F931F93F62E672F082F10E00C5F1F4F4A +:10189000102F0027C80104960E94D00DC80105969C +:1018A0006F2D0E94D00D1F910F91FF900895FF9210 +:1018B0000F931F93CF93DF93082FF62EEA01122F79 +:1018C000862F8150853010F080E024C0802F0E9448 +:1018D000180C1F2980E0902F9C5F612F0E94D00D73 +:1018E000209719F0802FBE010BC06091E301709129 +:1018F000E4016F5F7F4F7093E4016093E301802FF9 +:101900000E943F0C85EE91E0602F41E050E00E9484 +:10191000BA0F81E0DF91CF911F910F91FF90089551 +:101920001F93CF93DF93182FFB01EA018081882357 +:1019300049F48181882331F48281882319F48381D9 +:10194000882391F0209781F0912F80E0845F9B4F56 +:10195000BF0144E050E00E94EA0D812FBE010E94C9 +:10196000270C21E030E002C020E030E0C901DF9127 +:10197000CF911F9108951F93CF93DF93182FFB01F1 +:10198000EA0180818F3F51F481818F3F91F4828100 +:101990008F3F79F483818F3F61F423C0882349F41A +:1019A0008181882331F48281882319F483818823FB +:1019B000C1F02097B1F0912F80E0845F9B4FBF0171 +:1019C00044E050E00E94EA0D812FBE010E94270CE6 +:1019D00085EE91E0612F44E050E00E94BA0F81E073 +:1019E00001C080E0DF91CF911F910895AF92BF9227 +:1019F000DF92EF92FF920F931F93CF93DF93D82E36 +:101A0000EB015A01890185EE91E06D2D0E94F20EE5 +:101A10008017910710F0780106C085EE91E06D2DDA +:101A20000E94F20E7C0185EE91E06D2DAE019501D4 +:101A300087010E94330EC701DF91CF911F910F9153 +:101A4000FF90EF90DF90BF90AF900895AF92BF925C +:101A5000DF92EF92FF920F931F93CF93DF93D82ED5 +:101A60005B018A0188E04130580710F000E018E07F +:101A7000DD2DC0E0CD5FDB4F85EE91E06D2D0E9446 +:101A8000F20E7C01CE010E94110E873129F08C31BB +:101A900019F000E010E003C0E016F10668F385EEEF +:101AA00091E06D2DA50198010E949E0E85EE91E0BA +:101AB0006D2D40E250E00E94BA0F0BC0CE010E9493 +:101AC000110E882331F48D2D0E94180C00E010E0D7 +:101AD00009C08D2D0E94CE0B84FFF0CF8D2D60E1CB +:101AE0000E94EC0BC801DF91CF911F910F91FF90E5 +:101AF000EF90DF90BF90AF9008950F93282FAB0128 +:101B000085EE91E0622F21E030E001E00E94700F4D +:101B100081E090E00F910895CF92DF92FF920F93B2 +:101B20001F93CF93DF93F82E6B018A0185EE91E02E +:101B30006F2D0E94C00EEC01009769F49F2D80E08C +:101B40008D5F9B4F0E94110E8431F1F08823E1F0EC +:101B50008C3119F519C00817190738F4011511054A +:101B600019F4C0E0D0E010C0E80185EE91E06F2DDF +:101B7000A6019E0100E00E94700F85EE91E06F2D9E +:101B800040E450E00E94BA0FCE01DF91CF911F9147 +:101B90000F91FF90DF90CF900895CFEFDFEFE5CF6B +:101BA000282F2A9880EF8EBD0DB407FEFDCF8EB58D +:101BB0009EBD0DB407FEFDCF8EB52EBD0DB407FE44 +:101BC000FDCF8EB56EBD0DB407FEFDCF8EB52A9A42 +:101BD00081E00895DC0120E030E090EF1DC02A98FC +:101BE0009EBD0DB407FEFDCF8EB5BEBD0DB407FE84 +:101BF000FDCF8EB5AEBD0DB407FEFDCF8EB5FB019A +:101C0000E20FF31F80818EBD0DB407FEFDCF11964C +:101C10008EB52A9A2F5F3F4F2417350700F3CA016C +:101C20000895282F2A988FE08EBD0DB407FEFDCFB2 +:101C30008EB59EBD0DB407FEFDCF8EB52EBD0DB485 +:101C400007FEFDCF8EB51EBC0DB407FEFDCF8EB5D1 +:101C50002A9A089590E00496982F8827860F971F58 +:101C60000E94110E08959F92AF92BF92CF92DF9281 +:101C7000EF92FF920F931F93CF93DF937C01962EE9 +:101C8000EA0159016801862F64E270E00E942A0E81 +:101C9000182F892D65E270E00E942A0EC80FD11D11 +:101CA000912F80E0C80FD91FAE015770892D90E0A9 +:101CB000880F991FE80EF91EF70120813181240F4A +:101CC000351FCA018C0D9D1D8150984098F000E091 +:101CD00018E0041B150BC901B501A8010E94EA0D0B +:101CE000A601401B510BF701808191810A0D1B1D3C +:101CF000B80103C0C901B501A6010E94EA0D7E0129 +:101D0000EC0CFD1C092D10E00C5F1F4F102F00275D +:101D1000C80184966F2D0E94D00DC80185966E2D46 +:101D20000E94D00DDF91CF911F910F91FF90EF9006 +:101D3000DF90CF90BF90AF909F9008950F931F9327 +:101D4000FA01890140E050E09F010E94330E1F918B +:101D50000F910895FF920F931F93F82E66E270E0A3 +:101D60000E942A0E182F00E08F2D67E270E00E947B +:101D70002A0E080F111DC8011F910F91FF900895A1 +:101D8000FF920F931F93CF93DF93F62EC0E0D0E026 +:101D90008F2D0E94AA0E8C01009721F08F2D0E949A +:101DA000AA0EEC01C017D10799F7CE01DF91CF91B0 +:101DB0001F910F91FF900895FF920F931F93F82E9C +:101DC00060E270E00E942A0E182F00E08F2D61E281 +:101DD00070E00E942A0E080F111DC8011F910F917B +:101DE000FF900895FF920F931F93CF93DF93F62EEA +:101DF000C0E0D0E08F2D0E94DC0E8C01009721F016 +:101E00008F2D0E94DC0EEC01C017D10799F7CE018F +:101E1000DF91CF911F910F91FF900895DC0120E099 +:101E200030E09FE01DC02A989EBD0DB407FEFDCF97 +:101E30008EB5BEBD0DB407FEFDCF8EB5AEBD0DB4E3 +:101E400007FEFDCF8EB51EBC0DB407FEFDCF11966B +:101E50008EB5FB01E20FF31F80832A9A2F5F3F4F5D +:101E60002417350700F3CA010895CF92DF92EF924D +:101E7000FF920F931F93CF93DF93690178015770FF +:101E8000C62FD0E02496CC0FDD1FC80FD91F2881A4 +:101E90003981240F351FC801840F951F8150984048 +:101EA00088F000E018E0041B150BC901B601A80179 +:101EB0000E940E0FE01AF10A888199810C0D1D1DF8 +:101EC000B80102C0C901B601A7010E940E0FDF913F +:101ED000CF911F910F91FF90EF90DF90CF900895D9 +:101EE0008F929F92AF92BF92CF92DF92EF92FF922A +:101EF0000F931F93CF93DF937C01A62E6A014901B4 +:101F0000B02E862F68E270E00E942A0E182F8A2DCC +:101F100069E270E00E942A0E312F20E0E901C80F2B +:101F2000D11DC7016A2DAE01960184010E94350FB3 +:101F3000BB2099F47E01E80CF91C0A2D10E00C5F1F +:101F40001F4F102F0027C80188966F2D0E94D00DBB +:101F5000C80189966E2D0E94D00DDF91CF911F91FF +:101F60000F91FF90EF90DF90CF90BF90AF909F9038 +:101F70008F9008951F93162F962F80E08F5F9B4FB1 +:101F8000642F0E94D00D812F61E070E00E942A0E24 +:101F90008823C9F71F9108950F931F93182F092FB6 +:101FA0006CE271E080E090E00E94C2010E94FE0FAE +:101FB000229A80E090E060E80E94D00D8BE190E0F2 +:101FC00065E50E94D00D8AE190E065E50E94D00DA4 +:101FD000212F302FC901FC0180E090E491838083A0 +:101FE0008050904E9187808780509841329620E6AD +:101FF0008030920799F71F910F9108958DE061E06D +:102000000E9478028BE061E00E9478028AE061E041 +:102010000E9478028DE060E00E949E028BE060E00A +:102020000E949E028AE061E00E949E028CB580615F +:102030008CBD8CB580648CBD08950F9385EF91E0C5 +:1020400060E040E020E000E00E94F2020F9108957D +:102050009C01FB0182819381A481B581F901828376 +:102060009383A483B583178216820895CF93DF9359 +:10207000FB0101C0319680818823E1F7EB01A0E0EC +:10208000B0E020E030E021C06E3261F42F3F310536 +:1020900009F07CF5FA01EA0FFB1F2283119620E07C +:1020A00030E012C0C901E3E0880F991FEA95E1F71B +:1020B000220F331F820F931F262F332727FD3095C2 +:1020C00020533040280F391F21966881662319F06C +:1020D000A430B105CCF22F3F310509F054F4A430FF +:1020E000B1053CF4A40FB51F12962C9321E030E00B +:1020F00002C020E030E0C901DF91CF9108950F9335 +:102100008BEF91E060E040E020E000E00E94F2020E +:102110000F9108952F923F924F925F926F927F920C +:102120008F929F92AF92BF92CF92DF92EF92FF92E7 +:102130000F931F93DF93CF93CDB7DEB769970FB699 +:10214000F894DEBF0FBECDBF4C018B011A010E9477 +:10215000B4012B013C01F8E0EF2EF12CE80CF91C46 +:102160005801CC24DD2414C00E94B40164197509FF +:1021700086099709A616B706C806D90618F42FEFE0 +:102180003FEF0BC162E370E080E090E00E94C2018B +:10219000C7010E94720A1816190634F7F401228149 +:1021A000338144815581818D928DA38DB48D8A8731 +:1021B0009B87AC87BD87281739074A075B0709F05B +:1021C000EAC0858D968DC59709F0E5C000C18E01E6 +:1021D000025F1F4FC701B8014CE050E00E94520A55 +:1021E000F801528143815B834A83F4012681378160 +:1021F0008E859F852817390711F457FD06C0C70142 +:102200000E940B0A2CEF3FEFC8C04F705270452B55 +:1022100031F0C7010E940B0A2BEF3FEFBEC0F8015F +:10222000768067806114710441F0AA24BB244801C0 +:102230002E010894411C511C28C0C7010E940B0AA2 +:102240002AEF3FEFAAC0C701B20141E050E00E946F +:10225000520A8981882321F408C0C7010E94570AC5 +:102260008981815089838F5FC1F78981882359F7DC +:1022700000E010E0C7010E94570A0F5F1F4F0430B3 +:102280001105C1F70894A11CB11CF401D480C580CC +:10229000AC14BD04C0F244245524C701BE016F5FD5 +:1022A0007F4F41E050E00E94520A9981892F807C43 +:1022B00061F4992321F40DC0C7010E94570A898156 +:1022C000815089838F5FC1F704C0C7010E94570AFC +:1022D00019828981882309F7C701BE016C5F7F4F8E +:1022E00042E050E00E94520AC701BE016A5F7F4F80 +:1022F00042E050E00E94520A00E010E0C7010E9454 +:10230000570A0F5F1F4F04301105C1F7C701BE0107 +:102310006E5F7F4F42E050E00E94520ADC80CD8029 +:10232000F1E0CF16D10419F5BE80AF8081E0A81688 +:10233000B104E9F49A818B81049731F0C7010E94BE +:102340000B0A27EF3FEF29C0E2E0F0E02E0E3F1E20 +:10235000C701B10144E050E00E94520A21E030E0A0 +:102360001CC0C7010E94570A0F5F1F4F02C000E048 +:1023700010E09A808B800815190598F30894411C89 +:10238000511C4614570408F488CFC7010E940B0A59 +:1023900026EF3FEF02C02EEF3FEFC90169960FB65F +:1023A000F894DEBF0FBECDBFCF91DF911F910F918B +:1023B000FF90EF90DF90CF90BF90AF909F908F9065 +:1023C0007F906F905F904F903F902F9008958FE493 +:1023D00091E099878887C7010E94860B0C970CF0C3 +:1023E000F6CE2DEF3FEFD9CF6F927F928F929F92D3 +:1023F000AF92BF92CF92DF92EF92FF920F931F9313 +:10240000DF93CF9300D00F92CDB7DEB78C01F62EBD +:10241000E72E0E94B401F80177836683B8E0CB2EE3 +:10242000D12CC00ED11E0A5F1F4FC601B80142E079 +:1024300050E00E94C20A81E090E09B838A83A2E080 +:102440008A2E912C8C0E9D1EC601B40142E050E0F4 +:102450000E94C20A80E091E09B838A83C601B40196 +:1024600042E050E00E94C20A1B821A82C601B401F7 +:1024700042E050E00E94C20AC601B40142E050E0CE +:102480000E94C20AC601B40142E050E00E94C20AA2 +:102490002F2D3E2DC9018C017C013E010894611C49 +:1024A000711C20C00894E11CF11CF7018081882375 +:1024B00011F08E32B9F75701A01AB10A1A141B0491 +:1024C00074F48E2D801B8983C601B30141E050E076 +:1024D0000E94C20AC601B801A5010E94C20A870172 +:1024E0000F5F1F4FF7018081882311F07801DDCF46 +:1024F0001982C601BE016F5F7F4F41E050E00E942C +:10250000C20A00E011E01B830A83C601B40142E065 +:1025100050E00E94C20A1B830A83C601B40142E054 +:1025200050E00E94C20A81E090E00F900F900F905F +:10253000CF91DF911F910F91FF90EF90DF90CF909F +:10254000BF90AF909F908F907F906F9008958F92E3 +:102550009F92AF92BF92CF92DF92EF92FF920F9332 +:102560001F93DF93CF9300D000D000D0CDB7DEB75C +:102570006C017B014A010E943610892B19F001E0A1 +:1025800010E067C0F601228133814481558180913A +:10259000FD019091FE01A091FF01B091000228176A +:1025A00039074A075B0719F40EEF1FEF52C018E016 +:1025B000A12EB12CAC0CBD1C0E94B4019B01AC013E +:1025C0002F70307020503C4FC501B9010E948D0B17 +:1025D000813019F000E010E03CC08FE491E09A8374 +:1025E0008983F60182819381A481B5818B839C8349 +:1025F000AD83BE83C501BE016F5F7F4F45E350E0F1 +:102600000E94E20A8C01009709F1C601B7010E94FD +:10261000F4118C010097D1F0C5010E94DD0A8C01F4 +:102620000097A1F0EE24FF24C60168E873E1A4013D +:102630000E948A108C010894E11CF11CF3E0EF1653 +:10264000F10421F08FEF0F3F180771F3C5010E94CD +:10265000710BC80126960FB6F894DEBF0FBECDBF32 +:10266000CF91DF911F910F91FF90EF90DF90CF906E +:10267000BF90AF909F908F900895629FD001739FFD +:10268000F001829FE00DF11D649FE00DF11D929F0E +:10269000F00D839FF00D749FF00D659FF00D99274D +:1026A000729FB00DE11DF91F639FB00DE11DF91F71 +:1026B000BD01CF0111240895A1E21A2EAA1BBB1B54 +:1026C000FD010DC0AA1FBB1FEE1FFF1FA217B307FE +:1026D000E407F50720F0A21BB30BE40BF50B661F14 +:1026E000771F881F991F1A9469F7609570958095D8 +:1026F00090959B01AC01BD01CF010895EE0FFF1F26 +:0C2700000590F491E02D0994F894FFCFAF +:10270C00485454502F312E3120323030204F4B0052 +:10271C00436F6E74656E742D547970653A207465D0 +:10272C0078742F68746D6C00616E616C6F672069D2 +:10273C006E707574200020697320003C6272202F2B +:10274C003E00DEADBEEFFEED010004000000000D0A +:10275C0003000000001C0624071607FB06D10634F4 +:10276C00064207B607F6068F066B064B06000000FE +:10277C00003008B5088C0900000000F309C20A8675 +:10278C000B570A2D0A0B0A8D0B710BE20A010BDD9C +:0C279C000A720A520AD609DE09EF090091 +:00000001FF diff --git a/examples/WebServer/build-cli/WebServer.o b/examples/WebServer/build-cli/WebServer.o new file mode 100644 index 0000000..3d962af Binary files /dev/null and b/examples/WebServer/build-cli/WebServer.o differ diff --git a/examples/WebServer/build-cli/a.out.elf b/examples/WebServer/build-cli/a.out.elf new file mode 100755 index 0000000..4c68f99 Binary files /dev/null and b/examples/WebServer/build-cli/a.out.elf differ diff --git a/examples/WebServer/build-cli/depends.mk b/examples/WebServer/build-cli/depends.mk new file mode 100644 index 0000000..ec93e0e --- /dev/null +++ b/examples/WebServer/build-cli/depends.mk @@ -0,0 +1,21 @@ +build-cli/WebServer.o: build-cli/WebServer.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/SPI/SPI.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/Ethernet.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/IPAddress.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/EthernetClient.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Client.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/IPAddress.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Ethernet/EthernetServer.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Server.h diff --git a/examples/WebServer/build-cli/libcore.a b/examples/WebServer/build-cli/libcore.a new file mode 100644 index 0000000..74ed4db Binary files /dev/null and b/examples/WebServer/build-cli/libcore.a differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/Dhcp.o b/examples/WebServer/build-cli/libs/Ethernet/Dhcp.o new file mode 100644 index 0000000..3e2d856 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/Dhcp.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/Dns.o b/examples/WebServer/build-cli/libs/Ethernet/Dns.o new file mode 100644 index 0000000..983b216 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/Dns.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/Ethernet.o b/examples/WebServer/build-cli/libs/Ethernet/Ethernet.o new file mode 100644 index 0000000..e5f7970 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/Ethernet.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/EthernetClient.o b/examples/WebServer/build-cli/libs/Ethernet/EthernetClient.o new file mode 100644 index 0000000..9da0ad2 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/EthernetClient.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/EthernetServer.o b/examples/WebServer/build-cli/libs/Ethernet/EthernetServer.o new file mode 100644 index 0000000..4604112 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/EthernetServer.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/EthernetUdp.o b/examples/WebServer/build-cli/libs/Ethernet/EthernetUdp.o new file mode 100644 index 0000000..1fbb559 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/EthernetUdp.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/utility/socket.o b/examples/WebServer/build-cli/libs/Ethernet/utility/socket.o new file mode 100644 index 0000000..df05a9f Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/utility/socket.o differ diff --git a/examples/WebServer/build-cli/libs/Ethernet/utility/w5100.o b/examples/WebServer/build-cli/libs/Ethernet/utility/w5100.o new file mode 100644 index 0000000..6497a36 Binary files /dev/null and b/examples/WebServer/build-cli/libs/Ethernet/utility/w5100.o differ diff --git a/examples/WebServer/build-cli/libs/SPI/SPI.o b/examples/WebServer/build-cli/libs/SPI/SPI.o new file mode 100644 index 0000000..014ea96 Binary files /dev/null and b/examples/WebServer/build-cli/libs/SPI/SPI.o differ diff --git a/examples/WebServer/build-cli/main.o b/examples/WebServer/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/WebServer/build-cli/main.o differ diff --git a/examples/WebServer/build-cli/new.o b/examples/WebServer/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/WebServer/build-cli/new.o differ diff --git a/examples/WebServer/build-cli/wiring.o b/examples/WebServer/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/WebServer/build-cli/wiring.o differ diff --git a/examples/WebServer/build-cli/wiring_analog.o b/examples/WebServer/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/WebServer/build-cli/wiring_analog.o differ diff --git a/examples/WebServer/build-cli/wiring_digital.o b/examples/WebServer/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/WebServer/build-cli/wiring_digital.o differ diff --git a/examples/WebServer/build-cli/wiring_pulse.o b/examples/WebServer/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/WebServer/build-cli/wiring_pulse.o differ diff --git a/examples/WebServer/build-cli/wiring_shift.o b/examples/WebServer/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/WebServer/build-cli/wiring_shift.o differ diff --git a/examples/master_reader/Makefile b/examples/master_reader/Makefile new file mode 100644 index 0000000..7e744c1 --- /dev/null +++ b/examples/master_reader/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = Wire Wire/utility + +include ../../arduino-mk/Arduino.mk diff --git a/examples/master_reader/build-cli/CDC.o b/examples/master_reader/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/master_reader/build-cli/CDC.o differ diff --git a/examples/master_reader/build-cli/HID.o b/examples/master_reader/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/master_reader/build-cli/HID.o differ diff --git a/examples/master_reader/build-cli/HardwareSerial.o b/examples/master_reader/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/master_reader/build-cli/HardwareSerial.o differ diff --git a/examples/master_reader/build-cli/IPAddress.o b/examples/master_reader/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/master_reader/build-cli/IPAddress.o differ diff --git a/examples/master_reader/build-cli/Print.o b/examples/master_reader/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/master_reader/build-cli/Print.o differ diff --git a/examples/master_reader/build-cli/Stream.o b/examples/master_reader/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/master_reader/build-cli/Stream.o differ diff --git a/examples/master_reader/build-cli/Tone.o b/examples/master_reader/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/master_reader/build-cli/Tone.o differ diff --git a/examples/master_reader/build-cli/USBCore.o b/examples/master_reader/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/master_reader/build-cli/USBCore.o differ diff --git a/examples/master_reader/build-cli/WInterrupts.o b/examples/master_reader/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/master_reader/build-cli/WInterrupts.o differ diff --git a/examples/master_reader/build-cli/WMath.o b/examples/master_reader/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/master_reader/build-cli/WMath.o differ diff --git a/examples/master_reader/build-cli/WString.o b/examples/master_reader/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/master_reader/build-cli/WString.o differ diff --git a/examples/master_reader/build-cli/depends.mk b/examples/master_reader/build-cli/depends.mk new file mode 100644 index 0000000..c0fa464 --- /dev/null +++ b/examples/master_reader/build-cli/depends.mk @@ -0,0 +1,13 @@ +build-cli/master_reader.o: build-cli/master_reader.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Wire/Wire.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h diff --git a/examples/master_reader/build-cli/libcore.a b/examples/master_reader/build-cli/libcore.a new file mode 100644 index 0000000..02f077f Binary files /dev/null and b/examples/master_reader/build-cli/libcore.a differ diff --git a/examples/master_reader/build-cli/libs/Wire/Wire.o b/examples/master_reader/build-cli/libs/Wire/Wire.o new file mode 100644 index 0000000..a904806 Binary files /dev/null and b/examples/master_reader/build-cli/libs/Wire/Wire.o differ diff --git a/examples/master_reader/build-cli/libs/Wire/utility/twi.o b/examples/master_reader/build-cli/libs/Wire/utility/twi.o new file mode 100644 index 0000000..62ad0b2 Binary files /dev/null and b/examples/master_reader/build-cli/libs/Wire/utility/twi.o differ diff --git a/examples/master_reader/build-cli/main.o b/examples/master_reader/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/master_reader/build-cli/main.o differ diff --git a/examples/master_reader/build-cli/master_reader.cpp b/examples/master_reader/build-cli/master_reader.cpp new file mode 100644 index 0000000..12410b2 --- /dev/null +++ b/examples/master_reader/build-cli/master_reader.cpp @@ -0,0 +1,33 @@ +#include +// Wire Master Reader +// by Nicholas Zambetti + +// Demonstrates use of the Wire library +// Reads data from an I2C/TWI slave device +// Refer to the "Wire Slave Sender" example for use with this + +// Created 29 March 2006 + +// This example code is in the public domain. + + +#include + +void setup() +{ + Wire.begin(); // join i2c bus (address optional for master) + Serial.begin(9600); // start serial for output +} + +void loop() +{ + Wire.requestFrom(2, 6); // request 6 bytes from slave device #2 + + while(Wire.available()) // slave may send less than requested + { + char c = Wire.read(); // receive a byte as character + Serial.print(c); // print the character + } + + delay(500); +} diff --git a/examples/master_reader/build-cli/master_reader.d b/examples/master_reader/build-cli/master_reader.d new file mode 100644 index 0000000..c0fa464 --- /dev/null +++ b/examples/master_reader/build-cli/master_reader.d @@ -0,0 +1,13 @@ +build-cli/master_reader.o: build-cli/master_reader.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/libraries/Wire/Wire.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h diff --git a/examples/master_reader/build-cli/master_reader.elf b/examples/master_reader/build-cli/master_reader.elf new file mode 100755 index 0000000..51a4b8c Binary files /dev/null and b/examples/master_reader/build-cli/master_reader.elf differ diff --git a/examples/master_reader/build-cli/master_reader.hex b/examples/master_reader/build-cli/master_reader.hex new file mode 100644 index 0000000..64d9f82 --- /dev/null +++ b/examples/master_reader/build-cli/master_reader.hex @@ -0,0 +1,234 @@ +:100000000C9463000C948B000C948B000C948B006C +:100010000C948B000C948B000C948B000C948B0034 +:100020000C948B000C948B000C948B000C948B0024 +:100030000C948B000C948B000C948B000C948B0014 +:100040000C94BC000C948B000C9499010C94E0016E +:100050000C948B000C948B000C948B000C948B00F4 +:100060000C94FD040C948B00000000002400270079 +:100070002A0000000000250028002B0000000000DE +:1000800023002600290004040404040404040202DA +:100090000202020203030303030301020408102007 +:1000A0004080010204081020010204081020000012 +:1000B0000007000201000003040600000000000029 +:1000C00000005703180411241FBECFEFD8E0DEBF95 +:1000D000CDBF11E0A0E0B1E0ECE6FEE002C005908B +:1000E0000D92A032B107D9F712E0A0E2B1E001C051 +:1000F0001D92AD38B107E1F710E0C6ECD0E004C0C6 +:100100002297FE010E943007C23CD107C9F70E9426 +:10011000D9030C948D000C940000F8940C943407CF +:1001200085E192E062E070E046E050E00E949D04CC +:1001300009C085E192E00E94F103682F81EB91E014 +:100140000E94D10385E192E00E94E803892B89F7A0 +:1001500064EF71E080E090E00E940401089585E181 +:1001600092E00E94A00481EB91E040E855E260E05B +:1001700070E00E94290208951F920F920FB60F920D +:1001800011242F933F938F939F93AF93BF938091AD +:10019000240190912501A0912601B0912701309171 +:1001A00028010196A11DB11D232F2D5F2D3720F0B1 +:1001B0002D570196A11DB11D209328018093240184 +:1001C00090932501A0932601B093270180912001EF +:1001D00090912101A0912201B09123010196A11DCE +:1001E000B11D8093200190932101A0932201B0932F +:1001F0002301BF91AF919F918F913F912F910F90CC +:100200000FBE0F901F9018959B01AC017FB7F8941B +:100210008091200190912101A0912201B0912301B0 +:1002200066B5A89B05C06F3F19F00196A11DB11DD1 +:100230007FBFBA2FA92F982F8827860F911DA11D48 +:10024000B11D62E0880F991FAA1FBB1F6A95D1F7E5 +:10025000BC012DC0FFB7F89480912001909121013D +:10026000A0912201B0912301E6B5A89B05C0EF3F04 +:1002700019F00196A11DB11DFFBFBA2FA92F982F0C +:1002800088278E0F911DA11DB11DE2E0880F991FD7 +:10029000AA1FBB1FEA95D1F7861B970B885E934078 +:1002A000C8F2215030404040504068517C4F2115E9 +:1002B00031054105510571F60895789484B5826041 +:1002C00084BD84B5816084BD85B5826085BD85B5FA +:1002D000816085BDEEE6F0E0808181608083E1E8A9 +:1002E000F0E01082808182608083808181608083E1 +:1002F000E0E8F0E0808181608083E1EBF0E08081E4 +:1003000084608083E0EBF0E0808181608083EAE7B5 +:10031000F0E080818460808380818260808380813E +:10032000816080838081806880831092C1000895FD +:1003300008951F920F920FB60F9211242F933F939F +:100340004F938F939F93EF93FF934091C60020911B +:10035000690130916A012F5F3F4F2F733070809198 +:100360006B0190916C012817390759F0E0916901F0 +:10037000F0916A01E75DFE4F408330936A0120935C +:100380006901FF91EF919F918F914F913F912F9133 +:100390000F900FBE0F901F901895E091BD01F09146 +:1003A000BE01E05CFF4F8191919120813181821BE0 +:1003B000930B8F739070892B11F00E949801089510 +:1003C0001F920F920FB60F9211242F933F934F93CA +:1003D0005F936F937F938F939F93AF93BF93EF93AD +:1003E000FF932091AD013091AE018091AF019091CA +:1003F000B0012817390731F48091C1008F7D8093B7 +:10040000C10016C0E091AF01F091B001E359FE4F79 +:1004100040818091AF019091B001019660E470E05D +:100420000E94F9069093B0018093AF014093C600FB +:10043000FF91EF91BF91AF919F918F917F916F91BC +:100440005F914F913F912F910F900FBE0F901F9092 +:100450001895AF92BF92DF92EF92FF920F931F9386 +:10046000CF93DF93EC017A018B01DD24403081EEE4 +:10047000580780E0680780E0780711F0DD24D39406 +:1004800091E0A92EB12CEC89FD89DD2069F0C50130 +:100490000E8C02C0880F991F0A94E2F7808360E0F7 +:1004A00079E08DE390E005C0108260E874E88EE1A9 +:1004B00090E0A80197010E940C0721503040404075 +:1004C0005040569547953795279580E1203038075D +:1004D00020F0DD2011F0DD24D6CFE889F9893083C2 +:1004E000EA89FB892083EE89FF89408121E030E0A1 +:1004F000C9010A8C02C0880F991F0A94E2F7482BA1 +:100500004083EE89FF894081C9010B8C02C0880FAE +:10051000991F0A94E2F7482B4083EE89FF894081B6 +:10052000C9010C8C02C0880F991F0A94E2F7482B6E +:100530004083EE89FF8980810D8C02C0220F331F1A +:100540000A94E2F7209528232083DF91CF911F9111 +:100550000F91FF90EF90DF90BF90AF900895DC0176 +:100560001C96ED91FC911D97E05CFF4F219131911C +:1005700080819181281B390B2F733070C901089538 +:10058000DC011C96ED91FC911D97E05CFF4F2081F2 +:100590003181E054F040DF01AE5BBF4F8D919C9103 +:1005A00011972817390719F42FEF3FEF07C08D91E6 +:1005B0009C91E80FF91F8081282F30E0C901089530 +:1005C000DC011C96ED91FC911D97E05CFF4F2081B2 +:1005D0003181E054F040DF01AE5BBF4F8D919C91C3 +:1005E00011972817390719F42FEF3FEF10C08D919D +:1005F0009C911197E80FF91F20818D919C91119783 +:1006000001968F73907011969C938E9330E0C90180 +:100610000895FC0186859785DC01A05CBF4FFC0135 +:10062000EE5BFF4F2D913C911197808191812817AE +:100630003907C1F70895CF93DF93EC01462FEE857C +:10064000FF85E05CFF4F80819181E054F04001968E +:1006500060E470E00E94F9069C01DF01AE5BBF4FD1 +:100660008D919C91119728173907D1F3E05CFF4FCA +:1006700080819181E054F040E80FF91F4083EE85BE +:10068000FF85E05CFF4F31832083EE89FF89208165 +:1006900081E090E00D8C02C0880F991F0A94E2F768 +:1006A000282B208381E090E0DF91CF910895109274 +:1006B000B4011092B30188EE93E0A0E0B0E0809323 +:1006C000B5019093B601A093B701B093B80184E04F +:1006D00091E09093B2018093B10189E291E090930F +:1006E000BE018093BD018DE691E09093C00180939F +:1006F000BF0185EC90E09093C2018093C10184EC2E +:1007000090E09093C4018093C30180EC90E09093BB +:10071000C6018093C50181EC90E09093C80180935D +:10072000C70186EC90E09093CA018093C90184E0F0 +:100730008093CB0183E08093CC0187E08093CD014F +:1007400085E08093CE0181E08093CF010895CF9220 +:10075000DF92EF92FF920F931F93CF93DF937C0171 +:100760006B018A01C0E0D0E00FC0D6016D916D0130 +:10077000D701ED91FC910190F081E02DC701099521 +:10078000C80FD91F015010400115110571F7CE0196 +:10079000DF91CF911F910F91FF90EF90DF90CF905D +:1007A0000895DC01ED91FC910190F081E02D099517 +:1007B0000895CF93DF930E945D010E94AF00CDECBE +:1007C000D1E00E9490002097E1F30E94CD01F9CF83 +:1007D0002091F10130E08091F001281B3109C9011D +:1007E00008954091F0018091F101481718F02FEF22 +:1007F0003FEF0AC0E42FF0E0E053FE4F8081282F46 +:1008000030E04F5F4093F001C9010895E091F0019D +:100810008091F101E81718F0EFEFFFEF06C0F0E06C +:10082000E053FE4F8081E82FF0E0CF010895089556 +:10083000109218021092170288EE93E0A0E0B0E048 +:100840008093190290931A02A0931B02B0931C028A +:1008500084E191E090931602809315020895CF925F +:10086000DF92EF92FF920F931F93CF93DF937C0160 +:100870006B018A01809114028823A1F0C0E0D0E0CE +:100880000DC0D701ED91FC91D601AC0FBD1F0190B9 +:10089000F081E02DC7016C9109952196C017D10711 +:1008A00080F304C0CB01642F0E94E204C801DF91F1 +:1008B000CF911F910F91FF90EF90DF90CF9008950F +:1008C000DF93CF930F92CDB7DEB7FC0169838091A0 +:1008D00014028823C9F080911302803238F081E03D +:1008E00090E09383828320E030E015C08091120273 +:1008F000E82FF0E0EE50FE4F998190838F5F809358 +:1009000012028093130205C0CE01019661E00E949D +:10091000E20421E030E0C9010F90CF91DF9108950A +:10092000413208F040E2862F60ED71E00E94AB0496 +:100930001092F0018093F10108950E9490040895AF +:100940001092F0011092F101109212021092130213 +:100950000E9478060895982F413210F040E030C090 +:10096000809121028823E1F781E0809321028FEFBB +:1009700080938C02109247024150409348024F5F8F +:10098000990F91609093220285EE8093BC00809134 +:1009900021028130E1F380914702841710F44091E5 +:1009A000470220E030E00AC0FB01E20FF31FD9014B +:1009B000A95DBD4F8C9180832F5F3F4F2417A0F31B +:1009C000842F0895482F613210F081E008958091BE +:1009D0002102843011F082E0089560936A02A9E454 +:1009E000B2E0842F9C01F90102C081918D938E2F7A +:1009F000841B8617D0F380E008951F920F920FB6E4 +:100A00000F9211242F933F934F935F936F937F9394 +:100A10008F939F93AF93BF93EF93FF938091B90010 +:100A200090E0887F90708036910509F4DCC08136B3 +:100A30009105CCF58832910509F47BC08932910586 +:100A4000B4F48031910509F46FC0813191053CF413 +:100A5000009709F431C1089709F039C165C08831A0 +:100A6000910509F466C0809709F031C17DC08034DA +:100A7000910509F49FC08134910544F480339105B8 +:100A800009F47DC0C89709F022C184C08035910562 +:100A900009F484C08835910509F491C08834910522 +:100AA00009F015C198C08839910509F4FDC089394C +:100AB0009105ECF48837910509F495C089379105C3 +:100AC0004CF48836910509F48EC08037910509F001 +:100AD000FEC089C08838910509F4E6C080399105C7 +:100AE00009F487C08038910509F0F1C082C0803BCD +:100AF000910509F4B0C0813B91054CF4803A910511 +:100B000009F489C0883A910509F0E1C0A4C0803C8D +:100B1000910509F4CDC0883C910509F4C9C0883B12 +:100B2000910509F0D4C0ACC0809122028093BB0033 +:100B3000B9C09091470280914802981768F490914B +:100B40004702E92FF0E0E95DFD4F80818093BB0013 +:100B50009F5F90934702A6C085ED8093BC00809173 +:100B6000BC0084FDFCCFB1C080E280938C0285ED97 +:100B70008093BC008091BC0084FDFCCFA6C080E3C4 +:100B800080938C0285ED8093BC008091BC0084FD35 +:100B9000FCCF9BC088E380938C028AC0809147027F +:100BA0009091BB00E82FF0E0E95DFD4F90838F5FEF +:100BB00080934702909147028091480271C08091D2 +:100BC00047029091BB00E82FF0E0E95DFD4F908374 +:100BD0008F5F8093470285ED8093BC008091BC00BD +:100BE00084FDFCCF72C083E08093210210928B02BF +:100BF00059C080918B02803208F056C080918B02E0 +:100C00009091BB00E82FF0E0E559FD4F90838F5F96 +:100C100080938B0247C080918B02803230F4E09148 +:100C20008B02F0E0E559FD4F108285ED8093BC000A +:100C30008091BC0084FDFCCF1092210260918B0258 +:100C4000E0912502F09126028BE692E070E0099592 +:100C500010928B022DC084E08093210210926902D1 +:100C600010926A02E0912302F0912402099580918A +:100C70006A02882329F481E080936A021092490273 +:100C800090916902E92FF0E0E75BFD4F808180934E +:100C9000BB009F5F909369029091690280916A0204 +:100CA000981710F485EC01C085E88093BC000FC054 +:100CB00085EC8093BC0009C010928C0285ED809376 +:100CC000BC008091BC0084FDFCCF10922102FF91FA +:100CD000EF91BF91AF919F918F917F916F915F91B4 +:100CE0004F913F912F910F900FBE0F901F9018952D +:100CF0001092210282E161E00E94910683E161E0AD +:100D00000E949106E9EBF0E080818E7F80838081F4 +:100D10008D7F808388E48093B80085E48093BC0055 +:100D20000895482F50E0CA0182559F4FFC0124913D +:100D3000CA0186569F4FFC0194914A575F4FFA01B2 +:100D40003491332309F440C0222351F1233071F050 +:100D5000243028F42130A1F0223011F514C02630BF +:100D6000B1F02730C1F02430D9F404C08091800064 +:100D70008F7703C0809180008F7D8093800010C0AA +:100D800084B58F7702C084B58F7D84BD09C0809102 +:100D9000B0008F7703C08091B0008F7D8093B0004A +:100DA000E32FF0E0EE0FFF1FEE58FF4FA591B49137 +:100DB0002FB7F894662321F48C919095892302C073 +:100DC0008C91892B8C932FBF0895AA1BBB1B51E1DB +:100DD00007C0AA1FBB1FA617B70710F0A61BB70BAB +:100DE000881F991F5A95A9F780959095BC01CD0150 +:100DF000089597FB092E07260AD077FD04D0E5DF7A +:100E000006D000201AF4709561957F4F0895F6F78B +:100E1000909581959F4F0895A1E21A2EAA1BBB1BA6 +:100E2000FD010DC0AA1FBB1FEE1FFF1FA217B307B6 +:100E3000E407F50720F0A21BB30BE40BF50B661FCC +:100E4000771F881F991F1A9469F760957095809590 +:100E500090959B01AC01BD01CF010895EE0FFF1FDE +:0C0E60000590F491E02D0994F894FFCF68 +:100E6C00000000001B03A703AF02E002C00209034D +:100E7C000000000060042F04E803F10306041704CB +:00000001FF diff --git a/examples/master_reader/build-cli/master_reader.o b/examples/master_reader/build-cli/master_reader.o new file mode 100644 index 0000000..39ffb1b Binary files /dev/null and b/examples/master_reader/build-cli/master_reader.o differ diff --git a/examples/master_reader/build-cli/new.o b/examples/master_reader/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/master_reader/build-cli/new.o differ diff --git a/examples/master_reader/build-cli/wiring.o b/examples/master_reader/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/master_reader/build-cli/wiring.o differ diff --git a/examples/master_reader/build-cli/wiring_analog.o b/examples/master_reader/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/master_reader/build-cli/wiring_analog.o differ diff --git a/examples/master_reader/build-cli/wiring_digital.o b/examples/master_reader/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/master_reader/build-cli/wiring_digital.o differ diff --git a/examples/master_reader/build-cli/wiring_pulse.o b/examples/master_reader/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/master_reader/build-cli/wiring_pulse.o differ diff --git a/examples/master_reader/build-cli/wiring_shift.o b/examples/master_reader/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/master_reader/build-cli/wiring_shift.o differ diff --git a/examples/master_reader/master_reader.ino b/examples/master_reader/master_reader.ino new file mode 100644 index 0000000..4124d7d --- /dev/null +++ b/examples/master_reader/master_reader.ino @@ -0,0 +1,32 @@ +// Wire Master Reader +// by Nicholas Zambetti + +// Demonstrates use of the Wire library +// Reads data from an I2C/TWI slave device +// Refer to the "Wire Slave Sender" example for use with this + +// Created 29 March 2006 + +// This example code is in the public domain. + + +#include + +void setup() +{ + Wire.begin(); // join i2c bus (address optional for master) + Serial.begin(9600); // start serial for output +} + +void loop() +{ + Wire.requestFrom(2, 6); // request 6 bytes from slave device #2 + + while(Wire.available()) // slave may send less than requested + { + char c = Wire.read(); // receive a byte as character + Serial.print(c); // print the character + } + + delay(500); +} diff --git a/examples/toneMelody/Makefile b/examples/toneMelody/Makefile new file mode 100644 index 0000000..17d67e8 --- /dev/null +++ b/examples/toneMelody/Makefile @@ -0,0 +1,9 @@ +ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java +PARSE_BOARD = ../../arduino-mk/ard-parse-boards + +BOARD_TAG = uno +ARDUINO_PORT = /dev/cu.usb* + +ARDUINO_LIBS = + +include ../../arduino-mk/Arduino.mk diff --git a/examples/toneMelody/build-cli/CDC.o b/examples/toneMelody/build-cli/CDC.o new file mode 100644 index 0000000..824599f Binary files /dev/null and b/examples/toneMelody/build-cli/CDC.o differ diff --git a/examples/toneMelody/build-cli/HID.o b/examples/toneMelody/build-cli/HID.o new file mode 100644 index 0000000..0774dd5 Binary files /dev/null and b/examples/toneMelody/build-cli/HID.o differ diff --git a/examples/toneMelody/build-cli/HardwareSerial.o b/examples/toneMelody/build-cli/HardwareSerial.o new file mode 100644 index 0000000..e904ad8 Binary files /dev/null and b/examples/toneMelody/build-cli/HardwareSerial.o differ diff --git a/examples/toneMelody/build-cli/IPAddress.o b/examples/toneMelody/build-cli/IPAddress.o new file mode 100644 index 0000000..1128ca7 Binary files /dev/null and b/examples/toneMelody/build-cli/IPAddress.o differ diff --git a/examples/toneMelody/build-cli/Print.o b/examples/toneMelody/build-cli/Print.o new file mode 100644 index 0000000..a48b528 Binary files /dev/null and b/examples/toneMelody/build-cli/Print.o differ diff --git a/examples/toneMelody/build-cli/Stream.o b/examples/toneMelody/build-cli/Stream.o new file mode 100644 index 0000000..9498c6f Binary files /dev/null and b/examples/toneMelody/build-cli/Stream.o differ diff --git a/examples/toneMelody/build-cli/Tone.o b/examples/toneMelody/build-cli/Tone.o new file mode 100644 index 0000000..554ecb8 Binary files /dev/null and b/examples/toneMelody/build-cli/Tone.o differ diff --git a/examples/toneMelody/build-cli/USBCore.o b/examples/toneMelody/build-cli/USBCore.o new file mode 100644 index 0000000..ed7cf51 Binary files /dev/null and b/examples/toneMelody/build-cli/USBCore.o differ diff --git a/examples/toneMelody/build-cli/WInterrupts.o b/examples/toneMelody/build-cli/WInterrupts.o new file mode 100644 index 0000000..ce3ad36 Binary files /dev/null and b/examples/toneMelody/build-cli/WInterrupts.o differ diff --git a/examples/toneMelody/build-cli/WMath.o b/examples/toneMelody/build-cli/WMath.o new file mode 100644 index 0000000..ff1923b Binary files /dev/null and b/examples/toneMelody/build-cli/WMath.o differ diff --git a/examples/toneMelody/build-cli/WString.o b/examples/toneMelody/build-cli/WString.o new file mode 100644 index 0000000..b8dc5b8 Binary files /dev/null and b/examples/toneMelody/build-cli/WString.o differ diff --git a/examples/toneMelody/build-cli/depends.mk b/examples/toneMelody/build-cli/depends.mk new file mode 100644 index 0000000..f31f04a --- /dev/null +++ b/examples/toneMelody/build-cli/depends.mk @@ -0,0 +1,12 @@ +build-cli/toneMelody.o: build-cli/toneMelody.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + pitches.h diff --git a/examples/toneMelody/build-cli/libcore.a b/examples/toneMelody/build-cli/libcore.a new file mode 100644 index 0000000..f8a1562 Binary files /dev/null and b/examples/toneMelody/build-cli/libcore.a differ diff --git a/examples/toneMelody/build-cli/libs/Wire/Wire.o b/examples/toneMelody/build-cli/libs/Wire/Wire.o new file mode 100644 index 0000000..a904806 Binary files /dev/null and b/examples/toneMelody/build-cli/libs/Wire/Wire.o differ diff --git a/examples/toneMelody/build-cli/libs/Wire/utility/twi.o b/examples/toneMelody/build-cli/libs/Wire/utility/twi.o new file mode 100644 index 0000000..62ad0b2 Binary files /dev/null and b/examples/toneMelody/build-cli/libs/Wire/utility/twi.o differ diff --git a/examples/toneMelody/build-cli/main.o b/examples/toneMelody/build-cli/main.o new file mode 100644 index 0000000..651e629 Binary files /dev/null and b/examples/toneMelody/build-cli/main.o differ diff --git a/examples/toneMelody/build-cli/new.o b/examples/toneMelody/build-cli/new.o new file mode 100644 index 0000000..a42daf2 Binary files /dev/null and b/examples/toneMelody/build-cli/new.o differ diff --git a/examples/toneMelody/build-cli/toneMelody.cpp b/examples/toneMelody/build-cli/toneMelody.cpp new file mode 100644 index 0000000..2606338 --- /dev/null +++ b/examples/toneMelody/build-cli/toneMelody.cpp @@ -0,0 +1,50 @@ +#include +/* + Melody + + Plays a melody + + circuit: + * 8-ohm speaker on digital pin 8 + + created 21 Jan 2010 + modified 30 Aug 2011 + by Tom Igoe + +This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Tone + + */ + #include "pitches.h" + +// notes in the melody: +int melody[] = { + NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4}; + +// note durations: 4 = quarter note, 8 = eighth note, etc.: +int noteDurations[] = { + 4, 8, 8, 4,4,4,4,4 }; + +void setup() { + // iterate over the notes of the melody: + for (int thisNote = 0; thisNote < 8; thisNote++) { + + // to calculate the note duration, take one second + // divided by the note type. + //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. + int noteDuration = 1000/noteDurations[thisNote]; + tone(8, melody[thisNote],noteDuration); + + // to distinguish the notes, set a minimum time between them. + // the note's duration + 30% seems to work well: + int pauseBetweenNotes = noteDuration * 1.30; + delay(pauseBetweenNotes); + // stop the tone playing: + noTone(8); + } +} + +void loop() { + // no need to repeat the melody. +} diff --git a/examples/toneMelody/build-cli/toneMelody.d b/examples/toneMelody/build-cli/toneMelody.d new file mode 100644 index 0000000..f31f04a --- /dev/null +++ b/examples/toneMelody/build-cli/toneMelody.d @@ -0,0 +1,12 @@ +build-cli/toneMelody.o: build-cli/toneMelody.cpp \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h \ + /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h \ + pitches.h diff --git a/examples/toneMelody/build-cli/toneMelody.elf b/examples/toneMelody/build-cli/toneMelody.elf new file mode 100755 index 0000000..fe2a4e3 Binary files /dev/null and b/examples/toneMelody/build-cli/toneMelody.elf differ diff --git a/examples/toneMelody/build-cli/toneMelody.hex b/examples/toneMelody/build-cli/toneMelody.hex new file mode 100644 index 0000000..2610f86 --- /dev/null +++ b/examples/toneMelody/build-cli/toneMelody.hex @@ -0,0 +1,212 @@ +:100000000C9462000C947F000C947F000C947F0091 +:100010000C947F000C947F000C947F000C94D90109 +:100020000C947F000C947F000C947F000C947F0054 +:100030000C947F000C947F000C947F000C947F0044 +:100040000C94C5000C947F000C947F000C947F00EE +:100050000C947F000C947F000C947F000C947F0024 +:100060000C947F000C947F00020000000024002705 +:10007000002A0000000000250028002B00000000DE +:1000800000230026002900040404040404040402DC +:100090000202020202030303030303010204081025 +:1000A00020408001020408102001020408102000F2 +:1000B0000000070002010000030406000000000029 +:1000C0000000000011241FBECFEFD8E0DEBFCDBF7F +:1000D00011E0A0E0B1E0E6EFFCE002C005900D9277 +:1000E000A232B107D9F711E0A2E2B1E001C01D923E +:1000F000A034B107E1F70E944B040C9481000C94EA +:100100000000F8940C9479060895EF92FF920F93F3 +:100110001F93CF93DF93C0E0D0E0FE01E05FFE4F7E +:100120006081718188EE93E00E9415067B01FE01DB +:10013000E050FF4F608171810027F7FC0095102F80 +:1001400088E0A80197010E943502C801B7010E940A +:10015000070526E636E646EA5FE30E946B050E9445 +:10016000D404882777FD8095982F0E940D0188E0A0 +:100170000E94C2012296C031D10579F6DF91CF915C +:100180001F910F91FF90EF9008951F920F920FB65D +:100190000F9211242F933F938F939F93AF93BF930D +:1001A0008091260190912701A0912801B091290109 +:1001B00030912A010196A11DB11D232F2D5F2D37EE +:1001C00020F02D570196A11DB11D20932A01809387 +:1001D000260190932701A0932801B09329018091D3 +:1001E000220190912301A0912401B0912501019653 +:1001F000A11DB11D8093220190932301A09324019E +:10020000B0932501BF91AF919F918F913F912F9115 +:100210000F900FBE0F901F9018959B01AC017FB7F8 +:10022000F8948091220190912301A0912401B09132 +:10023000250166B5A89B05C06F3F19F00196A11D69 +:10024000B11D7FBFBA2FA92F982F8827860F911D28 +:10025000A11DB11D62E0880F991FAA1FBB1F6A95DF +:10026000D1F7BC012DC0FFB7F89480912201909185 +:100270002301A0912401B0912501E6B5A89B05C0FA +:10028000EF3F19F00196A11DB11DFFBFBA2FA92F95 +:10029000982F88278E0F911DA11DB11DE2E0880FB8 +:1002A000991FAA1FBB1FEA95D1F7861B970B885E83 +:1002B0009340C8F2215030404040504068517C4F3C +:1002C000211531054105510571F60895789484B5DD +:1002D000826084BD84B5816084BD85B5826085BD42 +:1002E00085B5816085BDEEE6F0E080818160808328 +:1002F000E1E8F0E01082808182608083808181600B +:100300008083E0E8F0E0808181608083E1EBF0E0D1 +:10031000808184608083E0EBF0E080818160808375 +:10032000EAE7F0E08081846080838081826080835E +:100330008081816080838081806880831092C10089 +:100340000895813041F0813018F08230D1F409C035 +:1003500010926E00089580916F008D7F80936F00E2 +:100360000895809170008D7F8093700081E080936C +:10037000B0008091B100887F84608093B1001092BA +:10038000B30008951F93182F80912001811711F059 +:100390009FEF06C0E8E6F0E094918FEF8093200194 +:1003A000892F0E94A101812F60E00E9480041F918B +:1003B00008951F920F920FB60F9211242F933F931F +:1003C0004F935F936F937F938F939F93AF93BF935D +:1003D000EF93FF938091390190913A01A0913B01F5 +:1003E000B0913C010097A105B10551F1E0913D01AB +:1003F000F0913E01808190913F0189278083809117 +:10040000390190913A01A0913B01B0913C0118163D +:1004100019061A061B06C4F48091390190913A011D +:10042000A0913B01B0913C010197A109B1098093D2 +:10043000390190933A01A0933B01B0933C0104C071 +:10044000809120010E94C201FF91EF91BF91AF9175 +:100450009F918F917F916F915F914F913F912F91DC +:100460000F900FBE0F901F9018952F923F925F92A2 +:100470006F927F928F929F92AF92BF92CF92DF92B4 +:10048000EF92FF920F931F93DF93CF9300D000D092 +:10049000CDB7DEB7A82F1B0129833A834B835C833A +:1004A000809120018A1721F4E8E6F0E0549082C0A0 +:1004B0008F3F09F0DAC1A0932001E8E6F0E0549004 +:1004C0002FEF521609F4D1C181E0581639F192E0AC +:1004D000591609F449C0552009F06CC014BC15BC6C +:1004E00084B5826084BD85B5816085BD2A2F30E0EA +:1004F000F901E957FF4FE491F0E0EE0FFF1FED58CF +:10050000FF4F859194919093300180932F01255650 +:100510003F4FF9018491809331014EC010928000C9 +:100520001092810080918100886080938100809189 +:1005300081008160809381002A2F30E0F901E95722 +:10054000FF4FE491F0E0EE0FFF1FED58FF4F859154 +:100550009491909337018093360125563F4FF901CE +:1005600084918093380128C01092B0001092B1009D +:100570008091B00082608093B0008091B100816072 +:100580008093B1002A2F30E0F901E957FF4FE49141 +:10059000F0E0EE0FFF1FED58FF4F8591949190937F +:1005A0003E0180933D0125563F4FF9018491809390 +:1005B0003F0102C057FC59C18A2F61E00E945A04D2 +:1005C000552021F0F2E05F1609F0BEC03101882409 +:1005D000992460E072E18AE790E0A40193010E940F +:1005E0004A0659016A01860175010894E108F1087B +:1005F000010911092FEFE216F1040105110509F0B7 +:1006000008F499C060E472E48FE090E0A4019301E3 +:100610000E944A0679018A010894E108F10801095B +:10062000110982E05816C1F49FEFE916F1040105A3 +:10063000110509F008F484C060E970ED83E090E0F2 +:10064000A40193010E944A0679018A010894E108F5 +:10065000F1080109110983E0AFEFEA16F104010581 +:10066000110509F008F468C068E478EE81E090E0D4 +:10067000A40193010E944A0679018A010894E108C5 +:10068000F10801091109552011F483E01DC0B2E001 +:100690005B1611F084E018C0EFEFEE16F1040105CF +:1006A000110509F008F4DFC064E274EF80E090E027 +:1006B000A40193010E944A0679018A010894E10885 +:1006C000F1080109110985E0FFEFEF16F1040105BA +:1006D000110591F188F162E17AE780E090E0A401F0 +:1006E00093010E944A0679018A010894E108F10801 +:1006F00001091109552011F086E001C084E02FEFB7 +:10070000E216F10401051105B9F0B0F0C601B5011A +:1007100020E034E040E050E00E944A0679018A017E +:100720000894E108F10801091109552011F087E04A +:1007300008C085E003C081E0552019F485BD3AC0AA +:1007400082E08093B10036C05101CC24DD2460E00A +:1007500072E18AE790E0A60195010E944A067901BC +:100760008A010894E108F1080109110980E0E816FE +:1007700080E0F80681E0080780E0180710F491E0B7 +:1007800010C068E478EE81E090E0A60195010E9437 +:100790004A0679018A010894E108F1080109110962 +:1007A00093E0A1E05A1631F480918100887F982B64 +:1007B0009093810089819A81AB81BC810097A105CA +:1007C000B10529F48FEF9FEFAFEFBFEF13C0220CFD +:1007D000331CB10180E090E029813A814B815C813A +:1007E0000E94F60528EE33E040E050E00E94280623 +:1007F000C901DA01E1E05E16A1F0F2E05F1619F13D +:10080000552099F5E7BC80932B0190932C01A09380 +:100810002D01B0932E0180916E00826080936E0056 +:1008200024C0F0928900E092880080933201909376 +:100830003301A0933401B093350180916F00826041 +:1008400080936F0012C0E092B300809339019093BF +:100850003A01A0933B01B0933C018091700082600B +:100860008093700002C084E06CCF0F900F900F90C7 +:100870000F90CF91DF911F910F91FF90EF90DF903C +:10088000CF90BF90AF909F908F907F906F905F9030 +:100890003F902F900895CF93DF930E9466010E94AE +:1008A0008500C0E0D0E00E9484002097E1F30E9420 +:1008B0000000F9CF482F50E0CA0185569F4FFC0138 +:1008C000249149575F4FFA0184918823C1F0E82FA2 +:1008D000F0E0EE0FFF1FE759FF4FA591B49166239B +:1008E00041F49FB7F8948C91209582238C939FBFFD +:1008F00008959FB7F8948C91822B8C939FBF089595 +:10090000482F50E0CA0181559F4FFC012491CA0134 +:1009100085569F4FFC01949149575F4FFA013491DE +:10092000332309F440C0222351F1233071F02430E5 +:1009300028F42130A1F0223011F514C02630B1F096 +:100940002730C1F02430D9F404C0809180008F7723 +:1009500003C0809180008F7D8093800010C084B59B +:100960008F7702C084B58F7D84BD09C08091B000AF +:100970008F7703C08091B0008F7D8093B000E32F0C +:10098000F0E0EE0FFF1FED58FF4FA591B4912FB788 +:10099000F894662321F48C919095892302C08C9160 +:1009A000892B8C932FBF089504D06894B1118DC00A +:1009B000089570D088F09F5790F0B92F9927B751BC +:1009C000A0F0D1F0660F771F881F991F1AF0BA9513 +:1009D000C9F712C0B13081F077D0B1E0089574C08A +:1009E000672F782F8827B85F39F0B93FCCF3869509 +:1009F00077956795B395D9F73EF490958095709566 +:100A000061957F4F8F4F9F4F0895E89409C097FBE2 +:100A10003EF490958095709561957F4F8F4F9F4FD5 +:100A20009923A9F0F92F96E9BB279395F695879519 +:100A300077956795B795F111F8CFFAF4BB0F11F4DC +:100A400060FF1BC06F5F7F4F8F4F9F4F16C0882383 +:100A500011F096E911C0772321F09EE8872F762FB9 +:100A600005C0662371F096E8862F70E060E02AF0FA +:100A70009A95660F771F881FDAF7880F96958795E6 +:100A800097F9089557FD9058440F551F59F05F3F4F +:100A900071F04795880F97FB991F61F09F3F79F0A0 +:100AA00087950895121613061406551FF2CF469522 +:100AB000F1DF08C0161617061806991FF1CF8695A4 +:100AC0007105610508940895E894BB276627772788 +:100AD000CB0197F908950BD078C069D028F06ED07B +:100AE00018F0952309F05AC05FC01124EECFCADF79 +:100AF000A0F3959FD1F3950F50E0551F629FF00131 +:100B0000729FBB27F00DB11D639FAA27F00DB11D89 +:100B1000AA1F649F6627B00DA11D661F829F222712 +:100B2000B00DA11D621F739FB00DA11D621F839F99 +:100B3000A00D611D221F749F3327A00D611D231F6F +:100B4000849F600D211D822F762F6A2F11249F57BD +:100B500050408AF0E1F088234AF0EE0FFF1FBB1FE0 +:100B6000661F771F881F91505040A9F79E3F51057F +:100B700070F014C0AACF5F3FECF3983EDCF386958B +:100B800077956795B795F795E7959F5FC1F7FE2B2A +:100B9000880F911D9695879597F9089597F99F6706 +:100BA00080E870E060E008959FEF80EC08950024F5 +:100BB0000A941616170618060906089500240A94C2 +:100BC00012161306140605060895092E0394000C48 +:100BD00011F4882352F0BB0F40F4BF2B11F460FFD7 +:100BE00004C06F5F7F4F8F4F9F4F0895629FD0016A +:100BF000739FF001829FE00DF11D649FE00DF11DD8 +:100C0000929FF00D839FF00D749FF00D659FF00D86 +:100C10009927729FB00DE11DF91F639FB00DE11D73 +:100C2000F91FBD01CF011124089597FB092E072656 +:100C30000AD077FD04D049D006D000201AF4709570 +:100C400061957F4F0895F6F7909581959F4F089590 +:100C5000A1E21A2EAA1BBB1BFD010DC0AA1FBB1FC0 +:100C6000EE1FFF1FA217B307E407F50720F0A21B32 +:100C7000B30BE40BF50B661F771F881F991F1A949F +:100C800069F760957095809590959B01AC01BD01C9 +:100C9000CF01089597FB092E05260ED057FD04D0ED +:100CA000D7DF0AD0001C38F4509540953095219537 +:100CB0003F4F4F4F5F4F0895F6F790958095709591 +:100CC00061957F4F8F4F9F4F0895AA1BBB1B51E12A +:100CD00007C0AA1FBB1FA617B70710F0A61BB70BAC +:100CE000881F991F5A95A9F780959095BC01CD0151 +:060CF0000895F894FFCF07 +:100CF6000601C400C400DC00C4000000F7000601C1 +:100D060004000800080004000400040004000400B5 +:020D1600FF00DC +:00000001FF diff --git a/examples/toneMelody/build-cli/toneMelody.o b/examples/toneMelody/build-cli/toneMelody.o new file mode 100644 index 0000000..f14ed4c Binary files /dev/null and b/examples/toneMelody/build-cli/toneMelody.o differ diff --git a/examples/toneMelody/build-cli/wiring.o b/examples/toneMelody/build-cli/wiring.o new file mode 100644 index 0000000..965331b Binary files /dev/null and b/examples/toneMelody/build-cli/wiring.o differ diff --git a/examples/toneMelody/build-cli/wiring_analog.o b/examples/toneMelody/build-cli/wiring_analog.o new file mode 100644 index 0000000..45c4457 Binary files /dev/null and b/examples/toneMelody/build-cli/wiring_analog.o differ diff --git a/examples/toneMelody/build-cli/wiring_digital.o b/examples/toneMelody/build-cli/wiring_digital.o new file mode 100644 index 0000000..474a1cc Binary files /dev/null and b/examples/toneMelody/build-cli/wiring_digital.o differ diff --git a/examples/toneMelody/build-cli/wiring_pulse.o b/examples/toneMelody/build-cli/wiring_pulse.o new file mode 100644 index 0000000..6c131da Binary files /dev/null and b/examples/toneMelody/build-cli/wiring_pulse.o differ diff --git a/examples/toneMelody/build-cli/wiring_shift.o b/examples/toneMelody/build-cli/wiring_shift.o new file mode 100644 index 0000000..7101968 Binary files /dev/null and b/examples/toneMelody/build-cli/wiring_shift.o differ diff --git a/examples/toneMelody/pitches.h b/examples/toneMelody/pitches.h new file mode 100644 index 0000000..55c7d54 --- /dev/null +++ b/examples/toneMelody/pitches.h @@ -0,0 +1,95 @@ +/************************************************* + * Public Constants + *************************************************/ + +#define NOTE_B0 31 +#define NOTE_C1 33 +#define NOTE_CS1 35 +#define NOTE_D1 37 +#define NOTE_DS1 39 +#define NOTE_E1 41 +#define NOTE_F1 44 +#define NOTE_FS1 46 +#define NOTE_G1 49 +#define NOTE_GS1 52 +#define NOTE_A1 55 +#define NOTE_AS1 58 +#define NOTE_B1 62 +#define NOTE_C2 65 +#define NOTE_CS2 69 +#define NOTE_D2 73 +#define NOTE_DS2 78 +#define NOTE_E2 82 +#define NOTE_F2 87 +#define NOTE_FS2 93 +#define NOTE_G2 98 +#define NOTE_GS2 104 +#define NOTE_A2 110 +#define NOTE_AS2 117 +#define NOTE_B2 123 +#define NOTE_C3 131 +#define NOTE_CS3 139 +#define NOTE_D3 147 +#define NOTE_DS3 156 +#define NOTE_E3 165 +#define NOTE_F3 175 +#define NOTE_FS3 185 +#define NOTE_G3 196 +#define NOTE_GS3 208 +#define NOTE_A3 220 +#define NOTE_AS3 233 +#define NOTE_B3 247 +#define NOTE_C4 262 +#define NOTE_CS4 277 +#define NOTE_D4 294 +#define NOTE_DS4 311 +#define NOTE_E4 330 +#define NOTE_F4 349 +#define NOTE_FS4 370 +#define NOTE_G4 392 +#define NOTE_GS4 415 +#define NOTE_A4 440 +#define NOTE_AS4 466 +#define NOTE_B4 494 +#define NOTE_C5 523 +#define NOTE_CS5 554 +#define NOTE_D5 587 +#define NOTE_DS5 622 +#define NOTE_E5 659 +#define NOTE_F5 698 +#define NOTE_FS5 740 +#define NOTE_G5 784 +#define NOTE_GS5 831 +#define NOTE_A5 880 +#define NOTE_AS5 932 +#define NOTE_B5 988 +#define NOTE_C6 1047 +#define NOTE_CS6 1109 +#define NOTE_D6 1175 +#define NOTE_DS6 1245 +#define NOTE_E6 1319 +#define NOTE_F6 1397 +#define NOTE_FS6 1480 +#define NOTE_G6 1568 +#define NOTE_GS6 1661 +#define NOTE_A6 1760 +#define NOTE_AS6 1865 +#define NOTE_B6 1976 +#define NOTE_C7 2093 +#define NOTE_CS7 2217 +#define NOTE_D7 2349 +#define NOTE_DS7 2489 +#define NOTE_E7 2637 +#define NOTE_F7 2794 +#define NOTE_FS7 2960 +#define NOTE_G7 3136 +#define NOTE_GS7 3322 +#define NOTE_A7 3520 +#define NOTE_AS7 3729 +#define NOTE_B7 3951 +#define NOTE_C8 4186 +#define NOTE_CS8 4435 +#define NOTE_D8 4699 +#define NOTE_DS8 4978 + + diff --git a/examples/toneMelody/toneMelody.ino b/examples/toneMelody/toneMelody.ino new file mode 100644 index 0000000..8593ab7 --- /dev/null +++ b/examples/toneMelody/toneMelody.ino @@ -0,0 +1,49 @@ +/* + Melody + + Plays a melody + + circuit: + * 8-ohm speaker on digital pin 8 + + created 21 Jan 2010 + modified 30 Aug 2011 + by Tom Igoe + +This example code is in the public domain. + + http://arduino.cc/en/Tutorial/Tone + + */ + #include "pitches.h" + +// notes in the melody: +int melody[] = { + NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4}; + +// note durations: 4 = quarter note, 8 = eighth note, etc.: +int noteDurations[] = { + 4, 8, 8, 4,4,4,4,4 }; + +void setup() { + // iterate over the notes of the melody: + for (int thisNote = 0; thisNote < 8; thisNote++) { + + // to calculate the note duration, take one second + // divided by the note type. + //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. + int noteDuration = 1000/noteDurations[thisNote]; + tone(8, melody[thisNote],noteDuration); + + // to distinguish the notes, set a minimum time between them. + // the note's duration + 30% seems to work well: + int pauseBetweenNotes = noteDuration * 1.30; + delay(pauseBetweenNotes); + // stop the tone playing: + noTone(8); + } +} + +void loop() { + // no need to repeat the melody. +}