Merged 1.0.3

This commit is contained in:
Cristian Maglie 2012-12-10 15:55:05 +01:00
commit 433090f18b
44 changed files with 23966 additions and 16303 deletions

View File

@ -206,6 +206,33 @@ micro.build.extra_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid}
##############################################################
esplora.name=Arduino Esplora
esplora.upload.tool=avrdude
esplora.upload.protocol=avr109
esplora.upload.maximum_size=28672
esplora.upload.speed=57600
esplora.upload.disable_flushing=true
esplora.upload.use_1200bps_touch=true
esplora.upload.wait_for_upload_port=true
esplora.bootloader.tool=avrdude
esplora.bootloader.low_fuses=0xff
esplora.bootloader.high_fuses=0xd8
esplora.bootloader.extended_fuses=0xcb
esplora.bootloader.file=caterina/Caterina-Esplora.hex
esplora.bootloader.unlock_bits=0x3F
esplora.bootloader.lock_bits=0x2F
esplora.build.mcu=atmega32u4
esplora.build.f_cpu=16000000L
esplora.build.vid=0x2341
esplora.build.pid=0x8036
esplora.build.core=arduino
esplora.build.variant=leonardo
esplora.build.extra_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid}
##############################################################
mini.name=Arduino Mini
mini.upload.tool=avrdude
@ -501,6 +528,6 @@ menu.cpu.atmegang.atmega8.upload.maximum_size=7168
menu.cpu.atmegang.atmega8.bootloader.low_fuses=0xdf
menu.cpu.atmegang.atmega8.bootloader.high_fuses=0xca
menu.cpu.atmegang.atmega8.bootloader.file=atmegang/ATmegaBOOT.hex
menu.cpu.atmegang.atmega8.bootloader.file=atmega8/ATmegaBOOT.hex
menu.cpu.atmegang.atmega8.build.mcu=atmega8

View File

@ -0,0 +1,66 @@
:101C000012C02BC02AC029C028C027C026C025C0AA
:101C100024C023C022C021C020C01FC01EC01DC0C0
:101C20001CC01BC01AC011241FBECFE5D4E0DEBF0C
:101C3000CDBF10E0A0E6B0E0E8EEFFE102C0059005
:101C40000D92A236B107D9F711E0A2E6B0E001C0CB
:101C50001D92AA36B107E1F74FC0D2CFEF92FF92A3
:101C60000F931F93EE24FF24870113C00894E11CF7
:101C7000F11C011D111D81E0E81682E1F8068AE7DA
:101C8000080780E0180728F0E0916200F0916300F7
:101C900009955F9BEBCF8CB1992787FD90951F919C
:101CA0000F91FF90EF9008955D9BFECF8CB9089542
:101CB000D5DF803221F484E1F7DF80E1F5DF08959C
:101CC0001F93182FCBDF803231F484E1EDDF812FB9
:101CD000EBDF80E1E9DF1F9108951F93CF93DF933E
:101CE000182FC0E0D0E002C0B9DF2196C117E0F3A1
:101CF000DF91CF911F910895CFE5D4E0DEBFCDBF36
:101D0000000010BC83E389B988E18AB986E880BD08
:101D1000BD9A1092680130E2E0E0F0E02FE088B375
:101D2000832788BBCF010197F1F7215027FFF7CF19
:101D300020E12093680192DF803381F1813399F4AF
:101D40008DDF8032C1F784E1AFDF81E4ADDF86E56E
:101D5000ABDF82E5A9DF80E2A7DF89E4A5DF83E5C9
:101D6000A3DF80E5C7C0803429F478DF8638B0F07F
:101D700075DF14C0813471F471DF803811F482E0B2
:101D80001DC1813811F481E019C1823809F015C1F3
:101D900082E114C1823421F484E19FDF89DFCBCF5B
:101DA000853411F485E0F9CF8035C1F38135B1F385
:101DB0008235A1F3853539F451DF809364004EDF1D
:101DC00080936500EBCF863519F484E086DFF5C09B
:101DD000843609F093C042DF809367013FDF809330
:101DE0006601809169018E7F8093690137DF8534B8
:101DF00029F480916901816080936901C0E0D0E09D
:101E000006E610E005C02ADFF80181938F012196D4
:101E10008091660190916701C817D907A0F31EDF72
:101E2000803209F088CF8091690180FF1FC020E0D7
:101E300030E0E6E6F0E012C0A0916400B0916500E9
:101E40008191082EC5D08091640090916500019623
:101E500090936500809364002F5F3F4F80916601EF
:101E6000909167012817390738F343C0F894E19936
:101E7000FECF1127E0916400F0916500EE0FFF1F87
:101E8000C6E6D0E0809166019091670180FF01C0B5
:101E90000196103051F422D003E000935700E895EA
:101EA0001DD001E100935700E8950990199016D0D4
:101EB00001E000935700E8951395103258F0112770
:101EC0000DD005E000935700E89508D001E100939C
:101ED0005700E8953296029739F0DBCF0091570012
:101EE00001700130D9F30895103011F00296E7CF58
:101EF000112484E1D9DE80E1D7DE1DCF843709F0DB
:101F00004BC0ACDE80936701A9DE80936601A6DE3C
:101F100090916901853421F49160909369010DC01D
:101F20009E7F909369018091640090916500880F75
:101F3000991F909365008093640090DE803209F0D1
:101F4000FACE84E1B1DEC0E0D0E01EC0809169012C
:101F500080FF07C0A0916400B091650031D0802D52
:101F600008C081FD07C0E0916400F0916500E49134
:101F70008E2F9ADE80916400909165000196909377
:101F800065008093640021968091660190916701BD
:101F9000C817D907D8F2AFCF853761F45FDE80323A
:101FA00009F0C9CE84E180DE8EE17EDE83E97CDE4D
:101FB00087E0A0CF863709F0BECE80E081DEBBCEC1
:101FC000E199FECFBFBBAEBBE09A11960DB208956A
:101FD000E199FECFBFBBAEBB0DBA11960FB6F89418
:081FE000E29AE19A0FBE089598
:021FE800800077
:0400000300001C00DD
:00000001FF

View File

@ -36,7 +36,7 @@
#include <avr/pgmspace.h>
#include <avr/eeprom.h>
#include <avr/interrupt.h>
#include <avr/delay.h>
#include <util/delay.h>
//#define F_CPU 16000000

View File

@ -1,66 +1,62 @@
:101C000012C02BC02AC029C028C027C026C025C0AA
:101C100024C023C022C021C020C01FC01EC01DC0C0
:101C20001CC01BC01AC011241FBECFE5D4E0DEBF0C
:101C3000CDBF10E0A0E6B0E0E8EEFFE102C0059005
:101C000012C02CC02BC02AC029C028C027C026C0A3
:101C100025C024C023C022C021C020C01FC01EC0B8
:101C20001DC01CC01BC011241FBECFE5D4E0DEBF09
:101C3000CDBF10E0A0E6B0E0E6EAFFE102C005900B
:101C40000D92A236B107D9F711E0A2E6B0E001C0CB
:101C50001D92AA36B107E1F74FC0D2CFEF92FF92A3
:101C60000F931F93EE24FF24870113C00894E11CF7
:101C7000F11C011D111D81E0E81682E1F8068AE7DA
:101C8000080780E0180728F0E0916200F0916300F7
:101C900009955F9BEBCF8CB1992787FD90951F919C
:101CA0000F91FF90EF9008955D9BFECF8CB9089542
:101CB000D5DF803221F484E1F7DF80E1F5DF08959C
:101CC0001F93182FCBDF803231F484E1EDDF812FB9
:101CD000EBDF80E1E9DF1F9108951F93CF93DF933E
:101CE000182FC0E0D0E002C0B9DF2196C117E0F3A1
:101CF000DF91CF911F910895CFE5D4E0DEBFCDBF36
:101D0000000010BC83E389B988E18AB986E880BD08
:101D1000BD9A1092680130E2E0E0F0E02FE088B375
:101D2000832788BBCF010197F1F7215027FFF7CF19
:101D300020E12093680192DF803381F1813399F4AF
:101D40008DDF8032C1F784E1AFDF81E4ADDF86E56E
:101D5000ABDF82E5A9DF80E2A7DF89E4A5DF83E5C9
:101D6000A3DF80E5C7C0803429F478DF8638B0F07F
:101D700075DF14C0813471F471DF803811F482E0B2
:101D80001DC1813811F481E019C1823809F015C1F3
:101D900082E114C1823421F484E19FDF89DFCBCF5B
:101DA000853411F485E0F9CF8035C1F38135B1F385
:101DB0008235A1F3853539F451DF809364004EDF1D
:101DC00080936500EBCF863519F484E086DFF5C09B
:101DD000843609F093C042DF809367013FDF809330
:101DE0006601809169018E7F8093690137DF8534B8
:101DF00029F480916901816080936901C0E0D0E09D
:101E000006E610E005C02ADFF80181938F012196D4
:101E10008091660190916701C817D907A0F31EDF72
:101E2000803209F088CF8091690180FF1FC020E0D7
:101E300030E0E6E6F0E012C0A0916400B0916500E9
:101E40008191082EC5D08091640090916500019623
:101E500090936500809364002F5F3F4F80916601EF
:101E6000909167012817390738F343C0F894E19936
:101E7000FECF1127E0916400F0916500EE0FFF1F87
:101E8000C6E6D0E0809166019091670180FF01C0B5
:101E90000196103051F422D003E000935700E895EA
:101EA0001DD001E100935700E8950990199016D0D4
:101EB00001E000935700E8951395103258F0112770
:101EC0000DD005E000935700E89508D001E100939C
:101ED0005700E8953296029739F0DBCF0091570012
:101EE00001700130D9F30895103011F00296E7CF58
:101EF000112484E1D9DE80E1D7DE1DCF843709F0DB
:101F00004BC0ACDE80936701A9DE80936601A6DE3C
:101F100090916901853421F49160909369010DC01D
:101F20009E7F909369018091640090916500880F75
:101F3000991F909365008093640090DE803209F0D1
:101F4000FACE84E1B1DEC0E0D0E01EC0809169012C
:101F500080FF07C0A0916400B091650031D0802D52
:101F600008C081FD07C0E0916400F0916500E49134
:101F70008E2F9ADE80916400909165000196909377
:101F800065008093640021968091660190916701BD
:101F9000C817D907D8F2AFCF853761F45FDE80323A
:101FA00009F0C9CE84E180DE8EE17EDE83E97CDE4D
:101FB00087E0A0CF863709F0BECE80E081DEBBCEC1
:101FC000E199FECFBFBBAEBBE09A11960DB208956A
:101FD000E199FECFBFBBAEBB0DBA11960FB6F89418
:081FE000E29AE19A0FBE089598
:021FE800800077
:101C50001D92AA36B107E1F72BD0A3C1D1CF5D9B6E
:101C6000FECF8CB908955F9BFECF8CB108950F9382
:101C70001F93082F10E002C0F6DF1F5F1017E0F37C
:101C80001F910F9108951F93182FEDDF803231F4CB
:101C900084E1E5DF812FE3DF80E1E1DF1F9108953B
:101CA000E2DF803221F484E1DADF80E1D8DF0895D9
:101CB0000F931F93CF93DF93000010BC83E389B988
:101CC00088E18AB986E880BDBD9A1092680120E05B
:101CD00030E240E050E007C088B3832788BBCA01E8
:101CE0000197F1F72F5F2031B8F320936801BBDF34
:101CF000803381F1813399F4B6DF8032C1F784E11A
:101D0000AEDF81E4ACDF86E5AADF82E5A8DF80E212
:101D1000A6DF89E4A4DF83E5A2DF80E523C1803468
:101D200029F4A1DF8638B0F09EDF14C0813471F44D
:101D30009ADF803811F482E01DC1813811F481E00E
:101D400019C1823809F015C182E114C1823421F42D
:101D500084E18DDFA5DFCBCF853411F485E0F9CFA9
:101D60008035C1F38135B1F38235A1F3853539F47E
:101D70007ADF8093640077DF80936500EBCF863550
:101D800019F484E074DFF5C0843609F090C06BDF8D
:101D90008093670168DF80936601809169018E7F7F
:101DA0008093690160DF853429F480916901816045
:101DB0008093690100E010E007C055DFF801EA599F
:101DC000FF4F80830F5F1F4F8091660190916701E5
:101DD0000817190790F347DF803209F088CF809108
:101DE000690180FF1FC000E010E014C0F801EA594B
:101DF000FF4F80916400909165006081C5D0809113
:101E00006400909165000196909365008093640052
:101E10000F5F1F4F809166019091670108171907A6
:101E200028F343C0F894E199FECF1127E0916400B4
:101E3000F0916500EE0FFF1FC6E6D0E080916601CD
:101E40009091670180FF01C00196103051F422D0BB
:101E500003E000935700E8951DD001E1009357007F
:101E6000E8950990199016D001E000935700E89585
:101E70001395103258F011270DD005E0009357004C
:101E8000E89508D001E100935700E8953296029753
:101E900039F0DBCF0091570001700130D9F308957C
:101EA000103011F00296E7CF112484E15BC0843733
:101EB00009F04BC0D8DE80936701D5DE80936601C0
:101EC000D2DE90916901853421F49160909369018B
:101ED0000DC09E7F90936901809164009091650090
:101EE000880F991F9093650080936400BCDE803258
:101EF00009F0FDCE84E1B3DE00E010E01EC0809169
:101F0000690180FF06C0809164009091650034D023
:101F100008C081FD07C0E0916400F0916500E49184
:101F20008E2F9DDE809164009091650001969093C4
:101F30006500809364000F5F1F4F80916601909150
:101F4000670108171907D8F20EC0853779F48BDEC0
:101F5000803209F0CCCE84E182DE8EE180DE83E93E
:101F60007EDE87E07CDE80E17ADEC1CE863709F056
:101F7000BECE80E088DEBBCEE199FECF9FBB8EBB9C
:101F8000E09A99278DB30895262FE199FECF9FBB44
:101F90008EBB2DBB0FB6F894E29AE19A0FBE019664
:061FA0000895F894FFCF44
:021FA6008000B9
:0400000300001C00DD
:00000001FF

View File

@ -0,0 +1,4 @@
Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --disable-libssp --build=i686-linux-gnu --host=i686-linux-gnu --target=avr
Thread model: single
gcc version 4.3.5 (GCC)

View File

@ -26,7 +26,7 @@ ISPFLASH = $(DIRAVRBIN)/uisp -dpart=ATmega8 $(ISPPARAMS) --erase --upload if=$
OBJ = $(PROGRAM).o
OPTIMIZE = -Os
OPTIMIZE = -Os -funsigned-char -funsigned-bitfields -fno-inline-small-functions
DEFS = -DF_CPU=16000000 -DBAUD_RATE=19200
LIBS =

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
LUFA: 111009
make: 3.81
avrdude: 5.11.1
avr-libc: 1.6.7
binutils-avr: 2.19
gcc-avr 4.3.3

View File

@ -1,5 +1,5 @@
:200000000C946E010C9496010C9496010C9496010C9496010C9496010C9496010C94960150
:200020000C9496010C9496010C9410050C949B050C9496010C9496010C9496010C94960181
:200020000C9496010C9496010C94F6040C947D050C9496010C9496010C9496010C949601BA
:200040000C9496010C9496010C9496010C9496010C9496010C9496010C9496010C94B501C9
:200060000C9496010C9496010C9496010C9496010C9496010C9496010C9496010C949601C8
:200080000C9496010C9496010C9496010C9496010C9496010C9496010C9496010C949601A8
@ -20,12 +20,12 @@
:200260000000000000000000000000000000000000000000002C9EB4A0A1A2A434A6A7A553
:20028000AE362D3738271E1F20212223242526B333B62EB7B89F8485868788898A8B8C8D58
:2002A0008E8F909192939495969798999A9B9C9D2F3130A3AD350405060708090A0B0C0D7C
:2002C0000E0F101112131415161718191A1B1C1DAFB1B0B500004C042E072C0811241FBE36
:2002E000CFEFDAE0DEBFCDBF11E0A0E0B1E0EEECF2E102C005900D92AC32B107D9F711E061
:20030000ACE2B1E001C01D92AD39B107E1F712E0CCEDD2E004C02297FE010E946109C63DF0
:20032000D107C9F70E9486030C9465090C9400008091000161E00E94530364E873E080E002
:2003400090E00E94FD018091000160E00E9453036CE474E080E090E00E94FD010895809181
:20036000000161E00E94B60208951F920F920FB60F9211242F933F938F939F93AF93BF93DB
:2002C0000E0F101112131415161718191A1B1C1DAFB1B0B5000032041007150811241FBE85
:2002E000CFEFDAE0DEBFCDBF11E0A0E0B1E0E0EAF2E102C005900D92AC32B107D9F711E071
:20030000ACE2B1E001C01D92AD39B107E1F712E0CCEDD2E004C02297FE010E944A09C63D07
:20032000D107C9F70E946C030C944E090C9400008091000161E00E94390368EE73E080E043
:2003400090E00E94FD018091000160E00E94390368EE73E080E090E00E94FD010895809196
:20036000000161E00E94AC0208951F920F920FB60F9211242F933F938F939F93AF93BF93E5
:200380008091300190913101A0913201B0913301309134010196A11DB11D232F2D5F2D3794
:2003A00020F02D570196A11DB11D209334018093300190933101A0933201B0933301809117
:2003C0002C0190912D01A0912E01B0912F010196A11DB11D80932C0190932D01A0932E01BA
@ -37,119 +37,119 @@
:20048000991FAA1FBB1FEA95D1F7861B970B885E9340C8F2215030404040504068517C4F8F
:2004A000211531054105510571F60895789484B5826084BD84B5816084BD85B5826085BD0F
:2004C00085B5816085BDEEE6F0E0808181608083E1E8F0E010828081826080838081816043
:2004E0008083E0E8F0E0808181608083E1EBF0E0808184608083E0EBF0E080818160808378
:20050000E1E9F0E0808182608083808181608083E0E9F0E0808181608083E1ECF0E080815A
:2005200084608083808182608083808181608083E3ECF0E0808181608083E0ECF0E08081E8
:2005400082608083E2ECF0E0808181608083EAE7F0E08081846080838081826080838081C3
:20056000816080838081806880830895CF93DF93482F50E0CA018C509F4FFC0134914A52A0
:200580005F4FFA018491882369F190E0880F991FFC01E455FF4FA591B491FC01E654FF4F55
:2005A000C591D491662351F42FB7F8948C91932F909589238C93888189230BC0623061F40A
:2005C0002FB7F8948C91932F909589238C938881832B88832FBF06C09FB7F8948C91832BB7
:2005E0008C939FBFDF91CF9108958730C1F1883080F48330F9F0843030F4813029F182308B
:2006000009F050C024C08430C9F0863009F04AC022C08A3091F18B3030F4883031F1893037
:2006200009F040C026C08C3091F18C3060F18E30C9F533C0809180008F7703C08091800036
:200640008F7D80938000089584B58F7702C084B58F7D84BD08958091B0008F7703C080919F
:20066000B0008F7D8093B0000895809190008F7707C0809190008F7D03C080919000877FD9
:200680008093900008958091C0008F7703C08091C0008F7D8093C00008958091C200877F5A
:2006A0008093C2000895FF920F931F93F62E482F50E0CA018E5E9E4FFC012491CA018C501B
:2006C0009F4FFC0114914A525F4FFA0104910023C9F0222319F0822F0E94F502E02FF0E05D
:2006E000EE0FFF1FE654FF4FA591B4919FB7F894FF2021F48C911095812302C08C91812BD5
:200700008C939FBF1F910F91FF900895CF93DF930E9456028DE391E00E944D040E94AF01EC
:20072000C0E0D0E00E9498012097E1F30E940000F9CF282F809137018823C1F057FF1AC00D
:2007400015C02898909336018091F1008193E217F307B9F74115510539F08091F20088236E
:2007600019F48BE68093E800AFBF02C04FEF5FEFCA010895AFB7F89427702093E9008091A6
:20078000F200282F30E0241735070CF4A901FB019B01240F311D94E6DACFDF93CF930F922E
:2007A000CDB7DEB7BE016F5F7F4F41E050E00E949903019719F02FEF3FEF03C08981282F25
:2007C00030E0C9010F90CF91DF910895FF920F931F93F82E142F052F40913A0150913B0188
:2007E000212F302FC901DC01FB016EEF29C0F7FE02C0949101C090812091380130913901CE
:2008000024173507ACF48091E8008570E1F38091E80082FF03C02FEF3FEF17C09093F1008B
:20082000C90101968F739070892B11F46093E8002F5F3F4F3093390120933801119731964D
:200840001097A9F6812F902F9C01C9011F910F91FF9008959C018091E80082FFFCCFF90124
:20086000260F311D03C08091F1008193E217F307D1F7289884E6809336018BEF8093E80078
:20088000CB0108958093E9008091F200882319F08AE38093E800089508951092370181E05F
:2008A0008093D70080EA8093D80082E189BD09B400FEFDCF61E070E080E090E00E94FD01C8
:2008C00080E98093D8008CE08093E2001092E000559A209A08955F926F927F928F929F9246
:2008E000AF92BF92CF92DF92EF92FF920F931F93CF93DF93E82E842E752E809137018823FB
:2009000071F18B01242F352FC901EC017AEFF72E67E0962E9E2050E4552E8E2D90E040E220
:20092000A42EB12CA822B9223AE3632E20E4C22ED12CC822D92258C09FB7F8949092E900DA
:200940008091E80085FD02C020E004C08091F200252D281B9FBF222361F4FA9419F42FEF4D
:200960003FEF4DC061E070E080E090E00E94FD013BC0822F90E0C817D9070CF42C2FC21B28
:20098000D1094FB7F8949092E900A114B10421F406C01092F10021502223D9F719C0E7FCC6
:2009A00003C0F801922F10C0C801322F06C0FC010196E491E093F10031503323C1F706C038
:2009C00081918093F10091509923D1F7020F111D8091E80085FF05C0209729F4C114D1049D
:2009E00011F06092E8004FBF209709F0A5CF5D9884E680933501282D372DC9019C01C90158
:200A0000DF91CF911F910F91FF90EF90DF90CF90BF90AF909F908F907F906F905F90089564
:200A20001F920F920FB60F9211241F932F933F934F935F936F937F938F939F93AF93BF93B3
:200A4000EF93FF938091E1001092E100982F83FF0FC01092E90081E08093EB001092EC007D
:200A600082E38093ED001092370188E08093F00092FF36C083E08093E9008091F200882338
:200A800049F08AE38093E80005C082E891E00E94710701C012E09FB7F8941093E9008091C9
:200AA000F2009FBF882389F780913501882351F08091350181508093350180913501882335
:200AC00009F45D9A80913601882351F08091360181508093360180913601882309F4289AD9
:200AE000FF91EF91BF91AF919F918F917F916F915F914F913F912F911F910F900FBE0F90DB
:200B00001F9018950F931F93DF93CF930F92CDB7DEB719828E010F5F1F4FC8010E9490078F
:200B2000C8010E942909898190E00F90CF91DF911F910F9108951F920F920FB60F92112455
:200B4000EF92FF921F932F933F934F935F936F937F938F939F93AF93BF93EF93FF93DF93E7
:200B6000CF93CDB7DEB76197DEBFCDBF1092E9008091E80083FF0FC1FE0131969E01275F18
:200B80003F4F03C08091F1008193E217F307D1F7289884E68093360182EF8093E800998139
:200BA00097FF05C08091E80080FFFCCF03C08EEF8093E800292F30E0C90180769070892B80
:200BC00009F0C2C08A81882329F41092F1001092F100D6C0813009F4D3C0833009F4D0C08A
:200BE000853049F48091E80080FFFCCF8B8180688093E300C5C0863009F07CC01C81EF805A
:200C0000F8841230C1F51092E900109239011092380110923B0110923A010E94820599E0C1
:200C2000FE013996DF01292F1D922A95E9F799871A8791E09E8790E8988B9AEF998B209110
:200C4000380130913901275F3F4F3C872B878D871092E9001092390110923801F0923B01C3
:200C6000E0923A0180E0BF0149E050E00E94E6030E94820585C01092E9001092390110924C
:200C80003801F0923B01E0923A01123241F482E290E00E942109892B09F476C071C011303E
:200CA00079F488E0E816F10419F481E080933C0180913C01882309F06BC0ECE6F1E013C01B
:200CC000133009F061C08B81882319F4EEE2F1E00AC0823019F4E2E3F1E005C0813009F0C4
:200CE00053C0E4E5F1E0449180E8BF0150E00E94E60346C0873009F447C0883021F481E0A0
:200D00008093F1003DC08930D9F523703070232BD9F5E1E9F1E091E031E026E39093E900CA
:200D20003093EB0084918093EC002093ED009F5F3196953099F78EE78093EA001092EA0039
:200D40008B81809337011CC08F8198851092E900109239011092380190933B0180933A0144
:200D60008D81882329F4CE0101960E949C0706C0823051F4CE0101960E94F207882321F078
:200D80008EEF8093E80007C081E28093EB0003C0EEE7F1E0A8CF6196DEBFCDBFCF91DF91E3
:200DA000FF91EF91BF91AF919F918F917F916F915F914F913F912F911F91FF90EF900F9076
:200DC0000FBE0F901F90189520917E0130917F018091800190918101281B390B2F733070DC
:200DE000C901089520917E0130917F0180918001909181012817390719F42FEF3FEF09C045
:200E0000E0918001F0918101E25CFE4F8081282F30E0C901089520917E0130917F01809101
:200E20008001909181012817390719F42FEF3FEF13C0E0918001F0918101E25CFE4F2081C2
:200E4000809180019091810101968F739070909381018093800130E0C901089510928501EC
:200E60001092840188EE93E0A0E0B0E08093860190938701A0938801B093890180E191E0B2
:200E8000909383018093820108950F931F93DF93CF930F92CDB7DEB78C0169838091090102
:200EA000882369F083E0BE016F5F7F4F41E050E00E946B041816190614F49C0107C081E0F4
:200EC00090E0F8019383828320E030E0C9010F90CF91DF911F910F91089583E00E9442040D
:200EE000089582E00E94CD03482F20917E0130917F012F5F3F4F2F73307080918001909188
:200F000081012817390759F0E0917E01F0917F01E25CFE4F408330937F0120937E01089536
:200F2000FC0180818E5F808380E865E971E042E450E00E94E6030895FC0181819081913A63
:200F400059F4813209F04CC080E062E071E047E050E00E94E60342C0913209F041C0803246
:200F600039F482E091E067E070E00E942A0436C0823209F035C0828180930901809102013E
:200F800090910301A0910401B0910501805B9440A040B04019F58091090180FD12C087E74A
:200FA00097E790930108809300082BE088E190E00FB6F894A895809360000FBE20936000A7
:200FC0000DC088E10FB6F89480936000109260000FBEA895109201081092000881E00895B8
:200FE00080E00895FC0191818081813A31F4913089F080E0933089F40DC0813269F49B3082
:2010000021F4828180930A0105C09A3029F4828180930B0181E0089580E00895EF92FF92BF
:201020000F931F938C01E62EDC01ED91FC910480F581E02D0995F82ED801ED91FC9106809E
:20104000F781E02DC8016E2D09958F2D90E01F910F91FF90EF900895109290011092940178
:201060001092930182E291E090939201809391010895EF92FF920F931F93DF93CF930F9292
:20108000CDB7DEB789838B017A0184E0BE016F5F7F4F41E050E00E946B0484E4B801A7013A
:2010A0000E946B040F90CF91DF911F910F91FF90EF90089582E048E050E00E94390808957B
:2010C000FC0116821782108611861286138614823496BF010E945A080895DC01683810F046
:2010E000685829C0E62FF0E067FF13C0E058F04081E090E002C0880F991FEA95E2F7809572
:2011000014962C911497282314962C93149760E012C0EB5AFD4F6491662319F420E030E020
:201120001DC067FF08C014968C9114978D7F14968C9314976F77FD0190E0662321F08681BD
:20114000861709F416829F5F31969630B1F7CD011496BD010E945A0821E030E0C901089578
:20116000CF93DF93DC01683810F0685825C0E62FF0E067FF12C0E058F04081E090E002C061
:20118000880F991FEA95E2F714962C911497282B14962C93149760E00FC0EB5AFD4F64919A
:2011A0006623D9F167FF08C014968C911497826014968C9314976F7716968C9116978617ED
:2011C000A9F117968C911797861781F118968C911897861759F119968C911997861731F152
:2011E0001A968C911A97861709F11B968C911B978617E1F0ED01E0E0F0E09E2F8E818823E7
:2012000021F4EA0FFB1F668306C09F5F31962196E630F10591F7963049F481E090E013966A
:201220009C938E93129720E030E007C0CD011496BD010E945A0821E030E0C901DF91CF91F9
:20124000089580E867ED71E045E650E00E94E6030895FC0180818F5F808380E86CE372E069
:2012600049E150E00E94E6030895CF92DF92EF92FF920F931F93CF93DF937C016B018A016C
:20128000C0E0D0E00FC0D6016D916D01D701ED91FC910190F081E02DC7010995C80FD91FC5
:2012A000015010400115110571F7CE01DF91CF911F910F91FF90EF90DF90CF900895EE0F94
:2012C000FF1F0590F491E02D0994F894FFCF0D0000E1000000000000010100000000450796
:2012E0003509E4060B07F2066D077107000000000E083509B0086D086008FFFFFFFFFFFFED
:2004E0008083E0E8F0E0808181608083E1E9F0E0808182608083808181608083E0E9F0E07E
:20050000808181608083E1ECF0E0808184608083808182608083808181608083E3ECF0E007
:20052000808181608083E0ECF0E0808182608083E2ECF0E0808181608083EAE7F0E080812F
:20054000846080838081826080838081816080838081806880830895CF93DF93482F50E0E5
:20056000CA018C509F4FFC0134914A525F4FFA018491882369F190E0880F991FFC01E455D0
:20058000FF4FA591B491FC01E654FF4FC591D491662351F42FB7F8948C91932F9095892362
:2005A0008C93888189230BC0623061F42FB7F8948C91932F909589238C938881832B8883B2
:2005C0002FBF06C09FB7F8948C91832B8C939FBFDF91CF910895883071F1893068F48230EF
:2005E00031F1833020F4813009F042C01DC0833089F08430E9F512C08B3059F18C3028F41C
:200600008930E9F08A30A1F51EC08C3031F18E3079F529C0809180008F7703C0809180003C
:200620008F7D80938000089584B58F7702C084B58F7D84BD0895809190008F7707C08091DB
:2006400090008F7D03C080919000877F8093900008958091C0008F7703C08091C0008F7DDD
:200660008093C00008958091C200877F8093C2000895FF920F931F93F62E482F50E0CA0144
:200680008E5E9E4FFC012491CA018C509F4FFC0114914A525F4FFA0104910023C9F022239D
:2006A00019F0822F0E94EB02E02FF0E0EE0FFF1FE654FF4FA591B4919FB7F894FF2021F4DE
:2006C0008C911095812302C08C91812B8C939FBF1F910F91FF900895CF93DF930E94560262
:2006E0008DE391E00E9433040E94AF01C0E0D0E00E9498012097E1F30E940000F9CF282F17
:20070000809137018823C1F057FF1AC015C02898909336018091F1008193E217F307B9F75C
:200720004115510539F08091F200882319F48BE68093E800AFBF02C04FEF5FEFCA01089599
:20074000AFB7F89427702093E9008091F200282F30E0241735070CF4A901FB019B01240F1E
:20076000311D94E6DACFDF93CF930F92CDB7DEB7BE016F5F7F4F41E050E00E947F03019712
:2007800019F02FEF3FEF03C08981282F30E0C9010F90CF91DF910895FF920F931F93F82EEF
:2007A000142F052F40913A0150913B01212F302FC901DC01FB016EEF29C0F7FE02C0949125
:2007C00001C09081209138013091390124173507ACF48091E8008570E1F38091E80082FF0F
:2007E00003C02FEF3FEF17C09093F100C90101968F739070892B11F46093E8002F5F3F4FEC
:200800003093390120933801119731961097A9F6812F902F9C01C9011F910F91FF900895E8
:200820009C018091E80082FFFCCFF901260F311D03C08091F1008193E217F307D1F7289805
:2008400084E6809336018BEF8093E800CB0108958093E9008091F200882319F08AE38093D3
:20086000E800089508951092370181E08093D70080EA8093D80082E189BD09B400FEFDCFAC
:2008800061E070E080E090E00E94FD0180E98093D8008CE08093E2001092E000559A209A77
:2008A00008955F926F927F928F929F92AF92BF92CF92DF92EF92FF920F931F93CF93DF93A8
:2008C000E82E842E752E80913701882371F18B01242F352FC901EC017AEFF72E67E0962EC4
:2008E0009E2050E4552E8E2D90E040E2A42EB12CA822B9223AE3632E20E4C22ED12CC82259
:20090000D92258C09FB7F8949092E9008091E80085FD02C020E004C08091F200252D281B3E
:200920009FBF222361F4FA9419F42FEF3FEF4DC061E070E080E090E00E94FD013BC0822F1E
:2009400090E0C817D9070CF42C2FC21BD1094FB7F8949092E900A114B10421F406C01092D2
:20096000F10021502223D9F719C0E7FC03C0F801922F10C0C801322F06C0FC010196E491FE
:20098000E093F10031503323C1F706C081918093F10091509923D1F7020F111D8091E800EB
:2009A00085FF05C0209729F4C114D10411F06092E8004FBF209709F0A5CF5D9884E68093F1
:2009C0003501282D372DC9019C01C901DF91CF911F910F91FF90EF90DF90CF90BF90AF906D
:2009E0009F908F907F906F905F9008951F920F920FB60F9211242F933F934F935F936F93B8
:200A00007F938F939F93AF93BF93EF93FF938091E1001092E100982F83FF0FC01092E900B0
:200A200081E08093EB001092EC0082E38093ED001092370188E08093F00092FF34C083E037
:200A40008093E9008091F200882319F08AE38093E8008FB7F89492E09093E9009091F20018
:200A60008FBF992321F082E891E00E94530780913501882351F080913501815080933501F0
:200A800080913501882309F45D9A80913601882351F0809136018150809336018091360191
:200AA000882309F4289AFF91EF91BF91AF919F918F917F916F915F914F913F912F910F90CD
:200AC0000FBE0F901F9018950F931F93DF93CF930F92CDB7DEB719828E010F5F1F4FC8019D
:200AE0000E947907C8010E941209898190E00F90CF91DF911F910F9108951F920F920FB661
:200B00000F921124EF92FF921F932F933F934F935F936F937F938F939F93AF93BF93EF9355
:200B2000FF93DF93CF93CDB7DEB76197DEBFCDBF1092E9008091E80083FF0FC1FE01319679
:200B40009E01275F3F4F03C08091F1008193E217F307D1F7289884E68093360182EF809356
:200B6000E800998197FF05C08091E80080FFFCCF03C08EEF8093E800292F30E0C901807672
:200B80009070892B09F0C2C08A81882329F41092F1001092F100D6C0813009F4D3C08330A3
:200BA00009F4D0C0853049F48091E80080FFFCCF8B8180688093E300C5C0863009F07CC019
:200BC0001C81EF80F8841230C1F51092E900109239011092380110923B0110923A010E94F6
:200BE000640599E0FE013996DF01292F1D922A95E9F799871A8791E09E8790E8988B9AEF44
:200C0000998B2091380130913901275F3F4F3C872B878D871092E9001092390110923801EC
:200C2000F0923B01E0923A0180E0BF0149E050E00E94CC030E94640585C01092E9001092E2
:200C4000390110923801F0923B01E0923A01123241F482E290E00E940A09892B09F476C02B
:200C600071C0113079F488E0E816F10419F481E080933C0180913C01882309F06BC0ECE68D
:200C8000F1E013C0133009F061C08B81882319F4EEE2F1E00AC0823019F4E2E3F1E005C00A
:200CA000813009F053C0E4E5F1E0449180E8BF0150E00E94CC0346C0873009F447C08830C6
:200CC00021F481E08093F1003DC08930D9F523703070232BD9F5E1E9F1E091E031E026E3A1
:200CE0009093E9003093EB0084918093EC002093ED009F5F3196953099F78EE78093EA00FA
:200D00001092EA008B81809337011CC08F8198851092E900109239011092380190933B0146
:200D200080933A018D81882329F4CE0101960E94850706C0823051F4CE0101960E94DB0754
:200D4000882321F08EEF8093E80007C081E28093EB0003C0EEE7F1E0A8CF6196DEBFCDBF37
:200D6000CF91DF91FF91EF91BF91AF919F918F917F916F915F914F913F912F911F91FF9004
:200D8000EF900F900FBE0F901F90189520917E0130917F018091800190918101281B390B40
:200DA0002F733070C901089520917E0130917F0180918001909181012817390719F42FEF3A
:200DC0003FEF09C0E0918001F0918101E25CFE4F8081282F30E0C901089520917E013091DC
:200DE0007F0180918001909181012817390719F42FEF3FEF13C0E0918001F0918101E25C60
:200E0000FE4F2081809180019091810101968F739070909381018093800130E0C901089566
:200E2000109285011092840188EE93E0A0E0B0E08093860190938701A0938801B09389019C
:200E400080E191E0909383018093820108950F931F93DF93CF930F92CDB7DEB78C0169838B
:200E600080910901882369F083E0BE016F5F7F4F41E050E00E9451041816190614F49C015B
:200E800007C081E090E0F8019383828320E030E0C9010F90CF91DF911F910F91089583E00D
:200EA0000E9428040895CF93DF9312C082E00E94B3032FEF8F3F9207C9F0E0917E01F091B8
:200EC0007F01E25CFE4F8083D0937F01C0937E01C0917E01D0917F012196CF73D070809154
:200EE000800190918101C817D90701F7DF91CF910895FC0180818E5F808380E865E971E0B5
:200F000042E450E00E94CC030895FC0181819081913A59F4813209F04CC080E062E071E09A
:200F200047E050E00E94CC0342C0913209F041C0803239F482E091E067E070E00E9410042B
:200F400036C0823209F035C08281809309018091020190910301A0910401B0910501805B48
:200F60009440A040B04019F58091090180FD12C087E797E790930108809300082BE088E1AE
:200F800090E00FB6F894A895809360000FBE209360000DC088E10FB6F89480936000109264
:200FA00060000FBEA895109201081092000881E0089580E00895FC0191818081813A31F487
:200FC000913089F080E0933089F40DC0813269F49B3021F4828180930A0105C09A3029F4AD
:200FE000828180930B0181E0089580E00895EF92FF920F931F938C01E62EDC01ED91FC91E5
:201000000480F581E02D0995F82ED801ED91FC910680F781E02DC8016E2D09958F2D90E0E8
:201020001F910F91FF90EF90089510929001109294011092930182E291E090939201809377
:2010400091010895EF92FF920F931F93DF93CF930F92CDB7DEB789838B017A0184E0BE0137
:201060006F5F7F4F41E050E00E94510484E4B801A7010E9451040F90CF91DF911F910F910D
:20108000FF90EF90089582E048E050E00E9422080895FC01168217821086118612861386F6
:2010A00014823496BF010E9443080895DC01683810F0685829C0E62FF0E067FF13C0E0580A
:2010C000F04081E090E002C0880F991FEA95E2F7809514962C911497282314962C93149720
:2010E00060E012C0EB5AFD4F6491662319F420E030E01DC067FF08C014968C9114978D7F29
:2011000014968C9314976F77FD0190E0662321F08681861709F416829F5F31969630B1F701
:20112000CD011496BD010E94430821E030E0C9010895CF93DF93DC01683810F0685825C01E
:20114000E62FF0E067FF12C0E058F04081E090E002C0880F991FEA95E2F714962C911497BE
:20116000282B14962C93149760E00FC0EB5AFD4F64916623D9F167FF08C014968C91149780
:20118000826014968C9314976F7716968C9116978617A9F117968C911797861781F1189631
:2011A0008C911897861759F119968C911997861731F11A968C911A97861709F11B968C915E
:2011C0001B978617E1F0ED01E0E0F0E09E2F8E81882321F4EA0FFB1F668306C09F5F31964E
:2011E0002196E630F10591F7963049F481E090E013969C938E93129720E030E007C0CD0189
:201200001496BD010E94430821E030E0C901DF91CF91089580E867ED71E045E650E00E9427
:20122000CC030895FC0180818F5F808380E86CE372E049E150E00E94CC030895CF92DF9210
:20124000EF92FF920F931F93CF93DF937C016B018A01C0E0D0E00FC0D6016D916D01D701A6
:20126000ED91FC910190F081E02DC7010995C80FD91F015010400115110571F7CE01DF91AB
:20128000CF911F910F91FF90EF90DF90CF900895EE0FFF1F0590F491E02D0994F894FFCFEC
:2012A0000D0000E100000000000001010000000027071E09C606ED06D4064F0753070000A0
:2012C0000000F7071E09990856084908FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD
:2012E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0E
:20130000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED
:20132000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCD
:20134000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFAD
@ -895,13 +895,13 @@
:206FC000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD1
:206FE000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB1
:2070000055C000006EC000006CC000006AC0000068C0000066C0000064C0000062C0000043
:2070200060C000005EC00000EEC400005AC0000058C0000056C0000054C0000052C00000F2
:2070200060C000005EC00000F2C400005AC0000058C0000056C0000054C0000052C00000EE
:2070400050C0000078C000004CC000004AC0000048C0000046C0000044C0000042C00000BE
:2070600040C000003EC000003CC000003AC0000038C0000036C0000034C0000032C0000048
:2070800030C000002EC000002CC000002AC0000028C0000026C0000024C0000022C00000A8
:2070A00020C000001EC000001CC0000011241FBECFEFDAE0DEBFCDBF11E0A0E0B1E0EAE2B5
:2070A00020C000001EC000001CC0000011241FBECFEFDAE0DEBFCDBF11E0A0E0B1E0E2E3BC
:2070C000FFE702C005900D92A83AB107D9F711E0A8EAB1E001C01D92AE3BB107E1F78FD30B
:2070E00022C78ECFF89410926F0010928100109285001092840081E085BF15BE47985D9AEF
:2070E00026C78ECFF89410926F0010928100109285001092840081E085BF15BE47985D9AEB
:20710000289A0C94000008952091B2013091B3012F5F3F4F3093B3012093B201932F37FFA6
:2071200003C08EEF831B982F990F921710F447980895479A08951F920F920FB60F9211246E
:207140002F938F939F93EF93FF9310928500109284008091A8019091A901009741F00197D3
@ -928,14 +928,14 @@
:2073E000173609F04BC081E180935700E895DD24CC24C3943FC0E090AE01F090AF010091CC
:20740000B0011091B101B6E46B16D9F4ED2DF0E0EE29FF29E4918E2FEADEDD2081F082E08D
:2074200090E0A0E0B0E0E80EF91E0A1F1B1FE092AE01F092AF010093B0011093B101DC2470
:2074400018C0D801C701B695A7959795879555D5CEDE82E090E0A0E0B0E0E80EF91E0A1FF6
:2074400018C0D801C701B695A7959795879559D5CEDE82E090E0A0E0B0E0E80EF91E0A1FF2
:207460001B1FE092AE01F092AF010093B0011093B1012197209709F0BECF7DC08090AE01F5
:207480009090AF01A090B001B090B10196E4691609F05DC083E0F40180935700E89507B63E
:2074A00000FCFDCF54C0F6E46F1661F5772031F1E090AE01F090AF010091B0011091B1019E
:2074C0007EDED82ECC24852D90E08C299D29F7010C0140925700E895112482E090E0A0E08B
:2074E000B0E0E80EF91E0A1F1B1FE092AE01F092AF010093B0011093B10102C060DE582E1A
:20750000742423C0E090AE01F090AF010091B0011091B10116950795F794E79450DE682FFA
:20752000C701F3D48091AE019091AF01A091B001B091B1010296A11DB11D8093AE0190934D
:20752000C701F7D48091AE019091AF01A091B001B091B1010296A11DB11D8093AE01909349
:20754000AF01A093B001B093B101219704C05524772444244394209709F0A5CF96E46916B6
:2075600041F485E0F40180935700E89507B600FCFDCF8DE03CDE82E080936F009CC0833492
:2075800071F40091AE011091AF0119DE90E021E0F8010C0120935700E89511247CCE8336C8
@ -943,82 +943,82 @@
:2075C0005700E895112482E090E0A0E0B0E0E80EF91E0A1F1B1FE092AE01F092AF0100936A
:2075E000B0011093B10157CE8D3661F4E091AE01F091AF0185E080935700E89507B600FCF2
:20760000FDCF49CE823551F4E091AE01F091AF0105911491812FEBDD802F4CC0843421F5FE
:20762000E090AE01F090AF010091B0011091B10116950795F794E794C2DD682FC70165D4E2
:20762000E090AE01F090AF010091B0011091B10116950795F794E794C2DD682FC70169D4DE
:207640008091AE019091AF01A091B001B091B1010296A11DB11D8093AE019093AF01A093D8
:20766000B001B093B10117CE843609F5E090AE01F090AF010091B0011091B101D801C70142
:20768000B695A7959795879538D4B1DD82E090E0A0E0B0E0E80EF91E0A1F1B1FE092AE010E
:20768000B695A795979587953CD4B1DD82E090E0A0E0B0E0E80EF91E0A1F1B1FE092AE010A
:2076A000F092AF010093B0011093B10104C08B3111F08FE39CDD83E08093E9009091E8002B
:2076C0008091E8008E778093E80095FF04C010C08EB38823C9F08091E80080FFF9CF809193
:2076E000E8008E778093E80003C08EB3882361F08091E80080FFF9CF84E08093E9008091F1
:20770000E8008B778093E800DF91CF911F910F91FF90EF90DF90CF90BF90AF909F908F90AC
:207720007F906F905F904F9008959091B601892F8F77813249F58091B7018032A1F081328A
:2077400019F5913A09F58091E800877F8093E8008DE091E067E070E007D28091E8008B770F
:207760008093E8000895913279F48091E800877F8093E8008DE091E067E070E059D2809196
:20778000E8008E778093E800089582E061EC42E0B1D083E061E842E1ADD084E060E842E1F7
:2077A000A9C084B7877F84BF88E10FB6F89480936000109260000FBE20E880E090E00FB643
:2077400019F5913A09F58091E800877F8093E8008DE091E067E070E00BD28091E8008B770B
:207760008093E8000895913279F48091E800877F8093E8008DE091E067E070E05DD2809192
:20778000E8008E778093E800089582E061EC42E0B5D083E061E842E1B1D084E060E842E1EF
:2077A000ADC084B7877F84BF88E10FB6F89480936000109260000FBE20E880E090E00FB63F
:2077C000F89420936100809361000FBE81E085BF92E095BF3F9A209A559AE1E6F0E02083A1
:2077E000108247985D9A289A109289008AEF8093880090936F0083E080938100ECC040911A
:20780000000850910108109201081092000824B714BE88E10FB6F894809360001092600045
:207820000FBE822F90E0FC01E270F07021FD14C0213019F4859194910BC0283069F480918F
:20784000090190910A014817590731F0859194918F5F9F4F09F046DCA4DF78941092AD0101
:207860001092AC010CC0E2DC36D38091AC019091AD0181549F4110F01092140145DC8091FB
:207880001401882381F78091E00081608093E00029DC80E090E00895FA01923049F09330C0
:2078A00061F09130F9F485E191E022E130E01EC087E291E02EE330E019C0882329F485E6FA
:2078C00091E024E030E012C0813029F489E691E022E230E00BC0823029F48DE891E028E106
:2078E00030E004C080E090E020E030E091838083C90108958093E9008091EB00816080936A
:20790000EB001092ED006093EC004093ED008091EE00881F8827881F08958091B601882342
:207920008CF403C08EB38823B1F08091E80082FFF9CF8091E8008B778093E80008958EB361
:20794000882349F08091E80080FFF9CF8091E8008E778093E8000895EF92FF920F931F9307
:2079600045D04CD008ED10E0F80180818F77808380818068808380818F7D808319BC1EBA45
:207980001092B40180EEE82EF12CF70180818B7F8083F80180818160808380E060E042E049
:2079A000A9DFE1EEF0E080818E7F8083E2EEF0E0808181608083808188608083F701808125
:2079C0008E7F8083F8018081806180831F910F91FF90EF900895E7EDF0E080818160808335
:2079E0008AE482BF81E08093B501B6CFE8EDF0E080818E7F80831092E20008951092DA00D6
:207A00001092E10008951F920F920FB60F9211242F933F934F935F936F937F938F939F9389
:207A2000AF93BF93EF93FF938091DA0080FF1BC08091D80080FF17C08091DA008E7F80930F
:207A4000DA008091D90080FF0BC080E189BD82E189BD09B400FEFDCF81E08EBB3BD203C0C7
:207A600019BC1EBA37D28091E10080FF17C08091E20080FF13C08091E2008E7F8093E200CE
:207A80008091E20080618093E2008091D80080628093D80019BC85E08EBB1CD28091E10004
:207AA00084FF2CC08091E20084FF28C080E189BD82E189BD09B400FEFDCF8091D8008F7D2D
:207AC0008093D8008091E1008F7E8093E1008091E2008F7E8093E2008091E20081608093EC
:207AE000E2008091B401882331F48091E30087FD02C081E001C084E08EBBECD18091E10056
:207B000083FF21C08091E20083FF1DC08091E100877F8093E10082E08EBB1092B4018091B1
:207B2000E1008E7F8093E1008091E2008E7F8093E2008091E20080618093E20080E060E005
:207B400042E0D8DEC7D1FF91EF91BF91AF919F918F917F916F915F914F913F912F910F90B6
:207B60000FBE0F901F9018959C014091BC015091BD014617570718F4F90190E044C06115C8
:207B8000710511F0AB01F8CF8091E8008E778093E80040E050E0F0CF8EB3882309F444C006
:207BA000853009F443C08091E80083FF02C081E008958091E80082FD31C08091E80080FFF4
:207BC00022C08091F3009091F200782F60E0292F30E0262B372B07C081918093F10041503C
:207BE00050402F5F3F4F4115510519F02830310598F390E02830310509F491E08091E800A6
:207C00008E778093E8004115510531F6992321F605C08EB3882341F0853041F08091E800FD
:207C200082FFF7CF80E0089582E0089583E008959C016115710529F48091E8008B7780934D
:207C4000E800F90126C08EB3882391F1853091F18091E80083FF02C081E008958091E80083
:207C600082FFF1CF06C08091F10081936150704059F02091F3008091F200322F20E090E0C5
:207C8000822B932B892B79F78091E8008B778093E80061157105B9F605C08EB3882341F0E2
:207CA000853041F08091E80080FFF7CF80E0089582E0089583E008950F931F93DF93CF937C
:207CC00000D0CDB7DEB7E6EBF1E08091F100819381E0EE3BF807C9F728DD8091E80083FF3A
:207CE000E4C08091B6019091B701953009F46DC0963040F4913081F1913070F0933009F046
:207D0000D4C02AC0983009F4A3C0993009F4B2C0963009F0CAC07CC0803809F4C6C082380B
:207D200009F0C3C08091BA0187708093E9008091EB001092E9002091E800277F2093E800A7
:207D400090E025E0969587952A95E1F781708093F1001092F10087C0882319F0823009F0A2
:207D6000A4C08F71823009F0A0C08091B801882331F52091BA01277009F497C02093E90006
:207D80008091EB0080FF1BC0933021F48091EB00806213C08091EB0080618093EB0081E0C8
:207DA00090E002C0880F991F2A95E2F78093EA001092EA008091EB0088608093EB0010929D
:207DC000E9008091E800877F51C0882309F06DC01091B8011F770FB7F8948091E800877F98
:207DE0008093E8009ADD8091E80080FFFCCF8091E3008078812B8093E30080688093E30062
:207E0000112311F482E001C083E08EBB0FBF4DC08058823008F049C08091B8019091B9014F
:207E20006091BA01AE014F5F5F4F36DDBC01009709F43BC08091E800877F8093E800898128
:207E40009A8192DE8091E8008B778093E8002DC0803859F58091E800877F8093E8008091A3
:207E6000B4018093F1008091E8008E778093E80054DD1BC08823C9F49091B8019230A8F4A4
:207E80008091E800877F8093E8009093B40145DD8091B401882331F48091E30087FD02C01E
:207EA00081E001C084E08EBB70DC8091E80083FF0AC08091EB0080628093EB008091E8008D
:207EC000877F8093E8000F900F90CF91DF911F910F91089508951F938EB3882361F0109179
:207EE000E9001092E9008091E80083FF01C0E4DE17701093E9001F910895F999FECF92BD02
:207F000081BDF89A992780B50895262FF999FECF1FBA92BD81BD20BD0FB6F894FA9AF99A90
:207F20000FBE01960895F894FFCF4341544552494E4100777700080000000000000801128E
:207F4000011001020000084123360001000201000109023E00020100803209040000010258
:207F60000201000524001001042402040524060001070582030800FF09040100020A0000B4
:207F8000000705040210000107058302100001040309042203410072006400750069006E80
:207FA000006F0020004C0065006F006E006100720064006F00000018034100720064007557
:127FC0000069006E006F0020004C004C0043000000006E
:2077E000108247985D9A289A109289008AEF8093880090936F0083E080938100F0C0409116
:20780000000850910108109201081092000894B714BE88E10FB6F8948093600010926000D5
:207820000FBE292F30E0F901E270F07091FD18C090FF05C0859194918F5F9F4F81F423FFFF
:207840000FC08091090190910A014817590741F0E0E0F0E0859194918F5F9F4F09F042DC64
:20786000A0DF78941092AD011092AC010CC0DEDC36D38091AC019091AD0181549F4110F00D
:207880001092140141DC80911401882381F78091E00081608093E00025DC80E090E0089598
:2078A000FA01923049F0933061F09130F9F485E191E022E130E01EC087E291E02EE330E04D
:2078C00019C0882329F485E691E024E030E012C0813029F489E691E022E230E00BC0823006
:2078E00029F48DE891E028E130E004C080E090E020E030E091838083C90108958093E9004E
:207900008091EB0081608093EB001092ED006093EC004093ED008091EE00881F8827881F62
:2079200008958091B60188238CF403C08EB38823B1F08091E80082FFF9CF8091E8008B772A
:207940008093E80008958EB3882349F08091E80080FFF9CF8091E8008E778093E800089594
:20796000EF92FF920F931F9345D04CD008ED10E0F80180818F77808380818068808380819B
:207980008F7D808319BC1EBA1092B40180EEE82EF12CF70180818B7F8083F8018081816052
:2079A000808380E060E042E0A9DFE1EEF0E080818E7F8083E2EEF0E0808181608083808144
:2079C00088608083F70180818E7F8083F8018081806180831F910F91FF90EF900895E7ED06
:2079E000F0E08081816080838AE482BF81E08093B501B6CFE8EDF0E080818E7F808310921C
:207A0000E20008951092DA001092E10008951F920F920FB60F9211242F933F934F935F93F6
:207A20006F937F938F939F93AF93BF93EF93FF938091DA0080FF1BC08091D80080FF17C0B2
:207A40008091DA008E7F8093DA008091D90080FF0BC080E189BD82E189BD09B400FEFDCF36
:207A600081E08EBB3BD203C019BC1EBA37D28091E10080FF17C08091E20080FF13C0809138
:207A8000E2008E7F8093E2008091E20080618093E2008091D80080628093D80019BC85E049
:207AA0008EBB1CD28091E10084FF2CC08091E20084FF28C080E189BD82E189BD09B400FEC5
:207AC000FDCF8091D8008F7D8093D8008091E1008F7E8093E1008091E2008F7E8093E20012
:207AE0008091E20081608093E2008091B401882331F48091E30087FD02C081E001C084E067
:207B00008EBBECD18091E10083FF21C08091E20083FF1DC08091E100877F8093E10082E06A
:207B20008EBB1092B4018091E1008E7F8093E1008091E2008E7F8093E2008091E2008061E9
:207B40008093E20080E060E042E0D8DEC7D1FF91EF91BF91AF919F918F917F916F915F9130
:207B60004F913F912F910F900FBE0F901F9018959C014091BC015091BD014617570718F49D
:207B8000F90190E044C06115710511F0AB01F8CF8091E8008E778093E80040E050E0F0CF0F
:207BA0008EB3882309F444C0853009F443C08091E80083FF02C081E008958091E80082FD70
:207BC00031C08091E80080FF22C08091F3009091F200782F60E0292F30E0262B372B07C07A
:207BE00081918093F100415050402F5F3F4F4115510519F02830310598F390E02830310566
:207C000009F491E08091E8008E778093E8004115510531F6992321F605C08EB3882341F075
:207C2000853041F08091E80082FFF7CF80E0089582E0089583E008959C016115710529F47C
:207C40008091E8008B778093E800F90126C08EB3882391F1853091F18091E80083FF02C06C
:207C600081E008958091E80082FFF1CF06C08091F10081936150704059F02091F300809191
:207C8000F200322F20E090E0822B932B892B79F78091E8008B778093E80061157105B9F601
:207CA00005C08EB3882341F0853041F08091E80080FFF7CF80E0089582E0089583E00895C2
:207CC0000F931F93DF93CF9300D0CDB7DEB7E6EBF1E08091F100819381E0EE3BF807C9F792
:207CE00024DD8091E80083FFE4C08091B6019091B701953009F46DC0963040F4913081F1A7
:207D0000913070F0933009F0D4C02AC0983009F4A3C0993009F4B2C0963009F0CAC07CC023
:207D2000803809F4C6C0823809F0C3C08091BA0187708093E9008091EB001092E9002091DB
:207D4000E800277F2093E80090E025E0969587952A95E1F781708093F1001092F10087C0D8
:207D6000882319F0823009F0A4C08F71823009F0A0C08091B801882331F52091BA01277097
:207D800009F497C02093E9008091EB0080FF1BC0933021F48091EB00806213C08091EB0018
:207DA00080618093EB0081E090E002C0880F991F2A95E2F78093EA001092EA008091EB00E5
:207DC00088608093EB001092E9008091E800877F51C0882309F06DC01091B8011F770FB79B
:207DE000F8948091E800877F8093E8009ADD8091E80080FFFCCF8091E3008078812B809398
:207E0000E30080688093E300112311F482E001C083E08EBB0FBF4DC08058823008F049C033
:207E20008091B8019091B9016091BA01AE014F5F5F4F36DDBC01009709F43BC08091E8008E
:207E4000877F8093E80089819A8192DE8091E8008B778093E8002DC0803859F58091E800AA
:207E6000877F8093E8008091B4018093F1008091E8008E778093E80054DD1BC08823C9F4CA
:207E80009091B8019230A8F48091E800877F8093E8009093B40145DD8091B401882331F420
:207EA0008091E30087FD02C081E001C084E08EBB6CDC8091E80083FF0AC08091EB0080624E
:207EC0008093EB008091E800877F8093E8000F900F90CF91DF911F910F91089508951F9360
:207EE0008EB3882361F01091E9001092E9008091E80083FF01C0E4DE17701093E9001F916F
:207F00000895F999FECF92BD81BDF89A992780B50895262FF999FECF1FBA92BD81BD20BDBD
:207F20000FB6F894FA9AF99A0FBE01960895F894FFCF4341544552494E4100777700080031
:207F40000000000000080112011001020000084123360001000201000109023E00020100FF
:207F600080320904000001020201000524001001042402040524060001070582030800FF0C
:207F800009040100020A000000070504021000010705830210000104030904220341007216
:207FA000006400750069006E006F0020004C0065006F006E006100720064006F0000001836
:1A7FC00003410072006400750069006E006F0020004C004C004300000000D7
:00000001FF

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

View File

@ -123,11 +123,11 @@ int main(void)
if (mcusr_state & (1<<EXTRF)) {
// External reset - we should continue to self-programming mode.
} else if (mcusr_state == (1<<PORF) && pgm_read_word(0) != 0xFFFF) {
} else if ((mcusr_state & (1<<PORF)) && (pgm_read_word(0) != 0xFFFF)) {
// After a power-on reset skip the bootloader and jump straight to sketch
// if one exists.
StartSketch();
} else if ((mcusr_state == (1<<WDRF)) && (bootKeyPtrVal != bootKey) && (pgm_read_word(0) != 0xFFFF)) {
} else if ((mcusr_state & (1<<WDRF)) && (bootKeyPtrVal != bootKey) && (pgm_read_word(0) != 0xFFFF)) {
// If it looks like an "accidental" watchdog reset then start the sketch.
StartSketch();
}

View File

@ -69,10 +69,17 @@
#define L_LED_OFF() PORTC &= ~(1<<7)
#define L_LED_ON() PORTC |= (1<<7)
#define L_LED_TOGGLE() PORTC ^= (1<<7)
#define TX_LED_OFF() PORTD |= (1<<5)
#define TX_LED_ON() PORTD &= ~(1<<5)
#define RX_LED_OFF() PORTB |= (1<<0)
#define RX_LED_ON() PORTB &= ~(1<<0)
#if DEVICE_PID == 0x0037 // polarity of the RX and TX LEDs is reversed on the Micro
#define TX_LED_OFF() PORTD &= ~(1<<5)
#define TX_LED_ON() PORTD |= (1<<5)
#define RX_LED_OFF() PORTB &= ~(1<<0)
#define RX_LED_ON() PORTB |= (1<<0)
#else
#define TX_LED_OFF() PORTD |= (1<<5)
#define TX_LED_ON() PORTD &= ~(1<<5)
#define RX_LED_OFF() PORTB |= (1<<0)
#define RX_LED_ON() PORTB &= ~(1<<0)
#endif
/* Type Defines: */
/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */

View File

@ -195,6 +195,10 @@ const USB_Descriptor_String_t ProductString =
#if DEVICE_PID == 0x0036
.UnicodeString = L"Arduino Leonardo"
#elif DEVICE_PID == 0x0037
.UnicodeString = L"Arduino Micro "
#elif DEVICE_PID == 0x003C
.UnicodeString = L"Arduino Esplora "
#else
.UnicodeString = L"USB IO board "
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
LUFA: 111009
make: 3.81
avrdude: 5.11.1
avr-libc: 1.6.7
binutils-avr: 2.19
gcc-avr 4.3.3

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

View File

@ -47,6 +47,7 @@
#----------------------------------------------------------------------------
# USB vendor ID (VID)
# reuse of this VID by others is forbidden by USB-IF
# official Arduino LLC VID
# VID = 0x2341
@ -54,7 +55,10 @@
# USB product ID (PID)
# official Leonardo PID
# PID = 0x0036
# official Micro PID
# PID = 0x0037
# official Esplora PID
# PID = 0x003C
# MCU name
MCU = atmega32u4
@ -123,7 +127,7 @@ OBJDIR = .
# Path to the LUFA library
LUFA_PATH = ../../../../../LUFA-111009
LUFA_PATH = ../../../../../../LUFA/LUFA-111009
# LUFA library compile-time options and predefined tokens

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
Builds against LUFA version 111009
make version 3.81
avrdude version 5.11
All AVR tools except avrdude were installed by CrossPack 20100115:
avr-gcc version 4.3.3 (GCC)
Thread model: single
Configured with: ../configure —prefix=/usr/local/CrossPack-AVR-20100115 —disable-dependency-tracking —disable-nls —disable-werror —target=avr —enable-languages=c,c++ —disable-nls —disable-libssp —with-dwarf2
avr-libc version 1.6.7
binutils version 2.19

View File

@ -36,8 +36,7 @@
/*
* on ATmega8, the uart and its bits are not numbered, so there is no "TXC0"
* definition. It is slightly cleaner to define this here instead of having
* conditional code in the cpp module.
* definition.
*/
#if !defined(TXC0)
#if defined(TXC)

View File

@ -55,6 +55,8 @@ const u16 STRING_IPRODUCT[17] = {
'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o'
#elif USB_PID == 0x8037
'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ',' ',' '
#elif USB_PID == 0x803C
'A','r','d','u','i','n','o',' ','E','s','p','l','o','r','a',' '
#elif USB_PID == 0x9208
'L','i','l','y','P','a','d','U','S','B',' ',' ',' ',' ',' ',' '
#else

File diff suppressed because it is too large Load Diff

View File

@ -334,7 +334,8 @@ void ack_recved(void* pcb, int len) {
static err_t atcp_poll(void *arg, struct tcp_pcb *pcb) {
struct ttcp* _ttcp = arg;
++tcp_poll_retries;
if ((_ttcp) && (_ttcp->left>0))
++tcp_poll_retries;
if (tcp_poll_retries > 4) {
WARN("ARD TCP [%p] arg=%p retries=%d\n",

View File

@ -0,0 +1,175 @@
/*
Esplora.cpp - Arduino Esplora board library
Written by Enrico Gueli
Copyright (c) 2012 Arduino(TM) All right reserved.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "Esplora.h"
_Esplora Esplora;
/*
* The following constants tell, for each accelerometer
* axis, which values are returned when the axis measures
* zero acceleration.
*/
const int ACCEL_ZERO_X = 320;
const int ACCEL_ZERO_Y = 330;
const int ACCEL_ZERO_Z = 310;
const byte MUX_ADDR_PINS[] = { A0, A1, A2, A3 };
const byte MUX_COM_PIN = A4;
const int JOYSTICK_DEAD_ZONE = 100;
const byte RED_PIN = 5;
const byte BLUE_PIN = 9;
const byte GREEN_PIN = 10;
const byte BUZZER_PIN = 6;
// non-multiplexer Esplora pins:
// Accelerometer: x-A5, y-A7, z-A6
// External outputs: D3, D11
// Buzzer: A8
// RGB Led: red-D5, green-D10/A11, blue-D9/A10
// Led 13: D13
const byte ACCEL_X_PIN = A5;
const byte ACCEL_Y_PIN = A11;
const byte ACCEL_Z_PIN = A6;
const byte LED_PIN = 13;
_Esplora::_Esplora() {
for (byte p=0; p<4; p++) {
pinMode(MUX_ADDR_PINS[p], OUTPUT);
}
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
}
unsigned int _Esplora::readChannel(byte channel) {
digitalWrite(MUX_ADDR_PINS[0], (channel & 1) ? HIGH : LOW);
digitalWrite(MUX_ADDR_PINS[1], (channel & 2) ? HIGH : LOW);
digitalWrite(MUX_ADDR_PINS[2], (channel & 4) ? HIGH : LOW);
digitalWrite(MUX_ADDR_PINS[3], (channel & 8) ? HIGH : LOW);
// workaround to cope with lack of pullup resistor on joystick switch
if (channel == CH_JOYSTICK_SW) {
pinMode(MUX_COM_PIN, INPUT_PULLUP);
unsigned int joystickSwitchState = (digitalRead(MUX_COM_PIN) == HIGH) ? 1023 : 0;
digitalWrite(MUX_COM_PIN, LOW);
return joystickSwitchState;
}
else
return analogRead(MUX_COM_PIN);
}
boolean _Esplora::joyLowHalf(byte joyCh) {
return (readChannel(joyCh) < 512 - JOYSTICK_DEAD_ZONE)
? LOW : HIGH;
}
boolean _Esplora::joyHighHalf(byte joyCh) {
return (readChannel(joyCh) > 512 + JOYSTICK_DEAD_ZONE)
? LOW : HIGH;
}
boolean _Esplora::readButton(byte ch) {
if (ch >= SWITCH_1 && ch <= SWITCH_4) {
ch--;
}
switch(ch) {
case JOYSTICK_RIGHT:
return joyLowHalf(CH_JOYSTICK_X);
case JOYSTICK_LEFT:
return joyHighHalf(CH_JOYSTICK_X);
case JOYSTICK_UP:
return joyLowHalf(CH_JOYSTICK_Y);
case JOYSTICK_DOWN:
return joyHighHalf(CH_JOYSTICK_Y);
}
unsigned int val = readChannel(ch);
return (val > 512) ? HIGH : LOW;
}
void _Esplora::writeRGB(byte r, byte g, byte b) {
writeRed(r);
writeGreen(g);
writeBlue(b);
}
#define RGB_FUNC(name, pin, lastVar) \
void _Esplora::write##name(byte val) { \
if (val == lastVar) \
return; \
analogWrite(pin, val); \
lastVar = val; \
delay(5); \
} \
\
byte _Esplora::read##name() { \
return lastVar; \
}
RGB_FUNC(Red, RED_PIN, lastRed)
RGB_FUNC(Green, GREEN_PIN, lastGreen)
RGB_FUNC(Blue, BLUE_PIN, lastBlue)
void _Esplora::tone(unsigned int freq) {
if (freq > 0)
::tone(BUZZER_PIN, freq);
else
::noTone(BUZZER_PIN);
}
void _Esplora::tone(unsigned int freq, unsigned long duration) {
if (freq > 0)
::tone(BUZZER_PIN, freq, duration);
else
::noTone(BUZZER_PIN);
}
void _Esplora::noTone() {
::noTone(BUZZER_PIN);
}
int _Esplora::readTemperature(const byte scale) {
long rawT = readChannel(CH_TEMPERATURE);
if (scale == DEGREES_C) {
return (int)((rawT * 500 / 1024) - 50);
}
else if (scale == DEGREES_F) {
return (int)((rawT * 450 / 512 ) - 58);
}
else {
return readTemperature(DEGREES_C);
}
}
int _Esplora::readAccelerometer(const byte axis) {
switch (axis) {
case X_AXIS: return analogRead(ACCEL_X_PIN) - ACCEL_ZERO_X;
case Y_AXIS: return analogRead(ACCEL_Y_PIN) - ACCEL_ZERO_Y;
case Z_AXIS: return analogRead(ACCEL_Z_PIN) - ACCEL_ZERO_Z;
default: return 0;
}
}

163
libraries/Esplora/Esplora.h Normal file
View File

@ -0,0 +1,163 @@
/*
Esplora.h - Arduino Esplora board library
Written by Enrico Gueli
Copyright (c) 2012 Arduino(TM) All right reserved.
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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ESPLORA_H_
#define ESPLORA_H_
#include "Arduino.h"
/*
* The following constants are used internally by the Esplora
* library code.
*/
const byte JOYSTICK_BASE = 16; // it's a "virtual" channel: its ID won't conflict with real ones
const byte MAX_CHANNELS = 13;
const byte CH_SWITCH_1 = 0;
const byte CH_SWITCH_2 = 1;
const byte CH_SWITCH_3 = 2;
const byte CH_SWITCH_4 = 3;
const byte CH_SLIDER = 4;
const byte CH_LIGHT = 5;
const byte CH_TEMPERATURE = 6;
const byte CH_MIC = 7;
const byte CH_JOYSTICK_SW = 10;
const byte CH_JOYSTICK_X = 11;
const byte CH_JOYSTICK_Y = 12;
/*
* The following constants can be used with the readButton()
* method.
*/
const byte SWITCH_1 = 1;
const byte SWITCH_2 = 2;
const byte SWITCH_3 = 3;
const byte SWITCH_4 = 4;
const byte SWITCH_DOWN = SWITCH_1;
const byte SWITCH_LEFT = SWITCH_2;
const byte SWITCH_UP = SWITCH_3;
const byte SWITCH_RIGHT = SWITCH_4;
const byte JOYSTICK_DOWN = JOYSTICK_BASE;
const byte JOYSTICK_LEFT = JOYSTICK_BASE+1;
const byte JOYSTICK_UP = JOYSTICK_BASE+2;
const byte JOYSTICK_RIGHT = JOYSTICK_BASE+3;
/*
* These constants can be use for comparison with the value returned
* by the readButton() method.
*/
const boolean PRESSED = LOW;
const boolean RELEASED = HIGH;
/*
* The following constants can be used with the readTemperature()
* method to specify the desired scale.
*/
const byte DEGREES_C = 0;
const byte DEGREES_F = 1;
/*
* The following constants can be used with the readAccelerometer()
* method to specify the desired axis to return.
*/
const byte X_AXIS = 0;
const byte Y_AXIS = 1;
const byte Z_AXIS = 2;
class _Esplora {
private:
byte lastRed;
byte lastGreen;
byte lastBlue;
unsigned int readChannel(byte channel);
boolean joyLowHalf(byte joyCh);
boolean joyHighHalf(byte joyCh);
public:
_Esplora();
/*
* Returns a number corresponding to the position of the
* linear potentiometer. 0 means full right, 1023 means
* full left.
*/
inline unsigned int readSlider() { return readChannel(CH_SLIDER); }
/*
* Returns a number corresponding to the amount of ambient
* light sensed by the light sensor.
*/
inline unsigned int readLightSensor() { return readChannel(CH_LIGHT); }
/*
* Returns the current ambient temperature, expressed either in Celsius
* or Fahreneit scale.
*/
int readTemperature(const byte scale);
/*
* Returns a number corresponding to the amount of ambient noise.
*/
inline unsigned int readMicrophone() { return readChannel(CH_MIC); }
inline unsigned int readJoystickSwitch() { return readChannel(CH_JOYSTICK_SW); }
inline int readJoystickX() {
return readChannel(CH_JOYSTICK_X) - 512;
}
inline int readJoystickY() {
return readChannel(CH_JOYSTICK_Y) - 512;
}
int readAccelerometer(const byte axis);
/*
* Reads the current state of a button. It will return
* LOW if the button is pressed, and HIGH otherwise.
*/
boolean readButton(byte channel);
void writeRGB(byte red, byte green, byte blue);
void writeRed(byte red);
void writeGreen(byte green);
void writeBlue(byte blue);
byte readRed();
byte readGreen();
byte readBlue();
void tone(unsigned int freq);
void tone(unsigned int freq, unsigned long duration);
void noTone();
};
extern _Esplora Esplora;
#endif // ESPLORA_H_

View File

@ -0,0 +1,125 @@
/*
Esplora Kart
This sketch turns the Esplora into a PC game pad.
It uses the both the analog joystick and the four switches.
By moving the joystick in a direction or by pressing a switch,
the PC will "see" that a key is pressed. If the PC is running
a game that has keyboard input, the Esplora can control it.
The default configuration is suitable for SuperTuxKart, an
open-source racing game. It can be downloaded from
http://supertuxkart.sourceforge.net/ .
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
*/
#include <Esplora.h>
/*
You're going to handle eight different buttons. You'll use arrays,
which are ordered lists of variables with a fixed size. Each array
has an index (counting from 0) to keep track of the position
you're reading in the array, and each position can contain a number.
This code uses three different arrays: one for the buttons you'll read;
a second to hold the current states of those buttons; and a third to hold
the keystrokes associated with each button.
*/
/*
This array holds the last sensed state of each of the buttons
you're reading.
Later in the code, you'll read the button states, and compare them
to the previous states that are stored in this array. If the two
states are different, it means that the button was either
pressed or released.
*/
boolean buttonStates[8];
/*
This array holds the names of the buttons being read.
Later in the sketch, you'll use these names with
the method Esplora.readButton(x), where x
is one of these buttons.
*/
const byte buttons[] = {
JOYSTICK_DOWN,
JOYSTICK_LEFT,
JOYSTICK_UP,
JOYSTICK_RIGHT,
SWITCH_RIGHT, // fire
SWITCH_LEFT, // bend
SWITCH_UP, // nitro
SWITCH_DOWN, // look back
};
/*
This array tells what keystroke to send to the PC when a
button is pressed.
If you look at this array and the above one, you can see that
the "cursor down" keystroke is sent when the joystick is moved
down, the "cursor up" keystroke when the joystick is moved up
and so on.
*/
const char keystrokes[] = {
KEY_DOWN_ARROW,
KEY_LEFT_ARROW,
KEY_UP_ARROW,
KEY_RIGHT_ARROW,
' ',
'V',
'N',
'B'
};
/*
This is code is run only at startup, to initialize the
virtual USB keyboard.
*/
void setup() {
Keyboard.begin();
}
/*
After setup() is finished, this code is run continuously.
Here we continuously check if something happened with the
buttons.
*/
void loop() {
// Iterate through all the buttons:
for (byte thisButton=0; thisButton<8; thisButton++) {
boolean lastState = buttonStates[thisButton];
boolean newState = Esplora.readButton(buttons[thisButton]);
if (lastState != newState) { // Something changed!
/*
The Keyboard library allows you to "press" and "release" the
keys as two distinct actions. These actions can be
linked to the buttons we're handling.
*/
if (newState == PRESSED) {
Keyboard.press(keystrokes[thisButton]);
}
else if (newState == RELEASED) {
Keyboard.release(keystrokes[thisButton]);
}
}
// Store the new button state, so you can sense a difference later:
buttonStates[thisButton] = newState;
}
/*
Wait a little bit (50ms) between a check and another.
When a mechanical switch is pressed or released, the
contacts may bounce very rapidly. If the check is done too
fast, these bounces may be confused as multiple presses and
may lead to unexpected behaviour.
*/
delay(50);
}

View File

@ -0,0 +1,42 @@
/*
Esplora LED Show
Makes the RGB LED bright and glow as the joystick or the
slider are moved.
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
Modified 24 Nov 2012
by Tom Igoe
*/
#include <Esplora.h>
void setup() {
// initialize the serial communication:
Serial.begin(9600);
}
void loop() {
// read the sensors into variables:
int xAxis = Esplora.readJoystickX();
int yAxis = Esplora.readJoystickY();
int slider = Esplora.readSlider();
// convert the sensor readings to light levels:
byte red = map(xAxis, -512, 512, 0, 255);
byte green = map(xAxis, -512, 512, 0, 255);
byte blue = slider/4;
// print the light levels:
Serial.print(red);
Serial.print(' ');
Serial.print(green);
Serial.print(' ');
Serial.println(blue);
// write the light levels to the LED.
Esplora.writeRGB(red, green, blue);
// add a delay to keep the LED from flickering:
delay(10);
}

View File

@ -0,0 +1,55 @@
/*
Esplora Led/Microphone
This simple sketch reads the microphone, light sensor, and slider.
Then it uses those readings to set the brightness of red, green and blue
channels of the RGB LED. The red channel will change with the loudness
"heared" by the microphone, the green channel changes as the
amount of light in the room and the blue channel will change
with the position of the slider.
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
Modified 24 Nov 2012
by Tom Igoe
*/
#include <Esplora.h>
void setup() {
// initialize the serial communication:
Serial.begin(9600);
}
int lowLight = 400; // the light sensor reading when it's covered
int highLight = 1023; // the maximum light sensor reading
int minGreen = 0; // minimum brightness of the green LED
int maxGreen = 100; // maximum brightness of the green LED
void loop() {
// read the sensors into variables:
int mic = Esplora.readMicrophone();
int light = Esplora.readLightSensor();
int slider = Esplora.readSlider();
// convert the sensor readings to light levels:
byte red = constrain(mic, 0, 255);
byte green = constrain(
map(light, lowLight, highLight, minGreen, maxGreen),
0, 255);
byte blue = slider/4;
// print the light levels (to see what's going on):
Serial.print(red);
Serial.print(' ');
Serial.print(green);
Serial.print(' ');
Serial.println(blue);
// write the light levels to the LED.
// note that the green value is always 0:
Esplora.writeRGB(red, green, blue);
// add a delay to keep the LED from flickering:
delay(10);
}

View File

@ -0,0 +1,52 @@
/*
Esplora Music
This sketch turns the Esplora in a simple musical instrument.
Press the Switch 1 and move the slider to see how it works.
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
modified 24 Nov 2012
by Tom Igoe
*/
#include <Esplora.h>
const int note[] = {
262, // C
277, // C#
294, // D
311, // D#
330, // E
349, // F
370, // F#
392, // G
415, // G#
440, // A
466, // A#
494, // B
523 // C next octave
};
void setup() {
}
void loop() {
// read the button labeled SWITCH_DOWN. If it's low,
// then play a note:
if (Esplora.readButton(SWITCH_DOWN) == LOW) {
int slider = Esplora.readSlider();
// use map() to map the slider's range to the
// range of notes you have:
byte thisNote = map(slider, 0, 1023, 0, 13);
// play the note corresponding to the slider's position:
Esplora.tone(note[thisNote]);
}
else {
// if the button isn't pressed, turn the note off:
Esplora.noTone();
}
}

View File

@ -0,0 +1,94 @@
/*
Esplora Slave
This sketch allows to test all the Esplora's peripherals.
It is also used with the ProcessingStart sketch (for Processing).
When uploaded, you can open the Serial monitor and write one of
the following commands (without quotes) to get an answer:
"D": prints the current value of all sensors, separated by a comma.
See the dumpInputs() function below to get the meaning of
each value.
"Rxxx"
"Gxxx"
"Bxxx": set the color of the RGB led. For example, write "R255"
to turn on the red to full brightness, "G128" to turn
the green to half brightness, or "G0" to turn off
the green channel.
"Txxxx": play a tone with the buzzer. The number is the
frequency, e.g. "T440" plays the central A note.
Write "T0" to turn off the buzzer.
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
*/
#include <Esplora.h>
void setup() {
while(!Serial); // needed for Leonardo-based board like Esplora
Serial.begin(9600);
}
void loop() {
if (Serial.available())
parseCommand();
}
/*
* This function reads a character from the serial line and
* decide what to do next. The "what to do" part is given by
* function it calls (e.g. dumpInputs(), setRed() and so on).
*/
void parseCommand() {
char cmd = Serial.read();
switch(cmd) {
case 'D': dumpInputs(); break;
case 'R': setRed(); break;
case 'G': setGreen(); break;
case 'B': setBlue(); break;
case 'T': setTone(); break;
}
}
void dumpInputs() {
/*
* please note: a single row contains two instructions.
* one is to print the sensor value, the other to print the
* comma symbol.
*/
Serial.print(Esplora.readButton(SWITCH_1)); Serial.print(',');
Serial.print(Esplora.readButton(SWITCH_2)); Serial.print(',');
Serial.print(Esplora.readButton(SWITCH_3)); Serial.print(',');
Serial.print(Esplora.readButton(SWITCH_4)); Serial.print(',');
Serial.print(Esplora.readSlider()); Serial.print(',');
Serial.print(Esplora.readLightSensor()); Serial.print(',');
Serial.print(Esplora.readTemperature(DEGREES_C)); Serial.print(',');
Serial.print(Esplora.readMicrophone()); Serial.print(',');
Serial.print(Esplora.readJoystickSwitch()); Serial.print(',');
Serial.print(Esplora.readJoystickX()); Serial.print(',');
Serial.print(Esplora.readJoystickY()); Serial.print(',');
Serial.print(Esplora.readAccelerometer(X_AXIS)); Serial.print(',');
Serial.print(Esplora.readAccelerometer(Y_AXIS)); Serial.print(',');
Serial.print(Esplora.readAccelerometer(Z_AXIS)); Serial.println();
}
void setRed() {
Esplora.writeRed(Serial.parseInt());
}
void setGreen() {
Esplora.writeGreen(Serial.parseInt());
}
void setBlue() {
Esplora.writeBlue(Serial.parseInt());
}
void setTone() {
Esplora.tone(Serial.parseInt());
}

View File

@ -0,0 +1,219 @@
/*
Esplora Table
Acts like a keyboard that prints some of its sensors'
data in a table-like text, row by row.
It is a sort of "data-logger".
At startup, it does nothing. It just waits for you to open a
spreadsheet (e.g. Google Drive spreadsheet) so it can put its
data. Then, by pressing Switch 1, it starts printing the table
headers and the first row of data. It waits a bit, then it
will print another row, and so on.
The amount of time between each row is given by the slider.
If put to full left, the sketch will wait 10 seconds; at
full right position, it will wait 5 minutes. An intermediate
position will make the sketch wait for some time in-between.
Clicking the Switch 1 at any time will stop the logging.
The color LED shows what the sketch is doing:
blue = idle, waiting for you to press Switch 1 to start logging
green = active; will print soon
red = printing data to the PC
Created on 22 november 2012
By Enrico Gueli <enrico.gueli@gmail.com>
modified 24 Nov 2012
by Tom Igoe
*/
#include <Esplora.h>
/*
* this variable tells if the data-logging is currently active.
*/
boolean active = false;
/*
* this variable holds the time in the future when the sketch
* will "sample" the data (sampling is the act of reading some
* input at a known time). This variable is checked continuously
* against millis() to know when it's time to sample.
*/
unsigned long nextSampleAt = 0;
/*
* This variable just holds the millis() value at the time the
* logging was activated. This is needed to enter the correct
* value in the "Time" column in the printed table.
*/
unsigned long startedAt = 0;
/*
* when the "active" variable is set to true, the same is done
* with this variable. This is needed because the code that does
* the "just-after-activation" stuff is run some time later than
* the code that says "be active now".
*/
boolean justActivated = false;
/*
* this variable holds the last sensed status of the switch press
* button. If the code sees a difference between the value of
* this variable and the current status of the switch, it means
* that the button was either pressed or released.
*/
boolean lastStartBtn = HIGH;
/*
* Initialization code. The virtual USB keyboard must be
* initialized; the Serial class is needed just for debugging.
*/
void setup() {
Keyboard.begin();
Serial.begin(9600);
}
/*
* This code is run continuously.
*/
void loop() {
/*
* note: we don't use Arduino's delay() here, because we can't
* normally do anything while delaying. Our own version lets us
* check for button presses often enough to not miss any event.
*/
activeDelay(50);
/*
* the justActivated variable may be set to true in the
* checkSwitchPress() function. Here we check its status to
* print the table headers and configure what's needed to.
*/
if (justActivated == true) {
justActivated = false; // do this just once
printHeaders();
// do next sampling ASAP
nextSampleAt = startedAt = millis();
}
if (active == true) {
if (nextSampleAt < millis()) {
// it's time to sample!
int slider = Esplora.readSlider();
// the row below maps the slider position to a range between
// 10 and 290 seconds.
int sampleInterval = map(slider, 0, 1023, 10, 290);
nextSampleAt = millis() + sampleInterval * 1000;
logAndPrint();
}
// let the RGB led blink green once per second, for 200ms.
unsigned int ms = millis() % 1000;
if (ms < 200)
Esplora.writeGreen(50);
else
Esplora.writeGreen(0);
Esplora.writeBlue(0);
}
else
// while not active, keep a reassuring blue color coming
// from the Esplora...
Esplora.writeBlue(20);
}
/*
* Print the table headers.
*/
void printHeaders() {
Keyboard.print("Time");
Keyboard.write(KEY_TAB);
activeDelay(300); // Some spreadsheets are slow, e.g. Google
// Drive that wants to save every edit.
Keyboard.print("Accel X");
Keyboard.write(KEY_TAB);
activeDelay(300);
Keyboard.print("Accel Y");
Keyboard.write(KEY_TAB);
activeDelay(300);
Keyboard.print("Accel Z");
Keyboard.println();
activeDelay(300);
}
void logAndPrint() {
// do all the samplings at once, because keystrokes have delays
unsigned long timeSecs = (millis() - startedAt) /1000;
int xAxis = Esplora.readAccelerometer(X_AXIS);
int yAxis = Esplora.readAccelerometer(Y_AXIS);
int zAxis = Esplora.readAccelerometer(Z_AXIS);
Esplora.writeRed(100);
Keyboard.print(timeSecs);
Keyboard.write(KEY_TAB);
activeDelay(300);
Keyboard.print(xAxis);
Keyboard.write(KEY_TAB);
activeDelay(300);
Keyboard.print(yAxis);
Keyboard.write(KEY_TAB);
activeDelay(300);
Keyboard.print(zAxis);
Keyboard.println();
activeDelay(300);
Keyboard.write(KEY_HOME);
Esplora.writeRed(0);
}
/**
* Similar to delay(), but allows to do something else
* in the meanwhile. In particular, it calls waitLoop().
* Note 1: it may wait longer than the specified amount, not less;
* Note 2: beware of data synchronization issues, e.g. if the
* whileWaiting() function alters some variables used by the
* caller of this function.
*
* I discovered by chance that there's an ongoing discussion about
* adding yield() in the Arduino API:
* http://comments.gmane.org/gmane.comp.hardware.arduino.devel/1381
* The purpose is the same, but for now I'm using this implementation.
*/
void activeDelay(unsigned long amount) {
unsigned long at = millis() + amount;
while (millis() < at) {
checkSwitchPress();
}
}
/*
* This function reads the status of the switch; if it sees that
* it was pressed, toggles the status of the "active" variable.
* If it's set to true, also the justActivated variable is set to
* true, so the loop() function above can do the right things.
* This function should be called as often as possible and do as
* little as possible, because it can be called while another
* function is running.
*/
void checkSwitchPress() {
boolean startBtn = Esplora.readButton(SWITCH_DOWN);
if (startBtn != lastStartBtn) {
if (startBtn == HIGH) { // button released
active = !active;
if (active)
justActivated = true;
}
lastStartBtn = startBtn;
}
}

View File

@ -0,0 +1,68 @@
#######################################
# Syntax Coloring Map For Esplora
#######################################
# Class
#######################################
Esplora KEYWORD3
#######################################
# Methods and Functions
#######################################
begin KEYWORD2
readSlider KEYWORD2
readLightSensor KEYWORD2
readTemperature KEYWORD2
readMicrophone KEYWORD2
readJoystickSwitch KEYWORD2
readJoystickX KEYWORD2
readJoystickY KEYWORD2
readAccelerometer KEYWORD2
readButton KEYWORD2
writeRGB KEYWORD2
writeRed KEYWORD2
writeGreen KEYWORD2
writeBlue KEYWORD2
readRed KEYWORD2
readGreen KEYWORD2
readBlue KEYWORD2
tone KEYWORD2
noTone KEYWORD2
#######################################
# Constants
#######################################
JOYSTICK_BASE LITERAL1
MAX_CHANNELS LITERAL1
CH_SWITCH_1 LITERAL1
CH_SWITCH_2 LITERAL1
CH_SWITCH_3 LITERAL1
CH_SWITCH_4 LITERAL1
CH_SLIDER LITERAL1
CH_LIGHT LITERAL1
CH_TEMPERATURE LITERAL1
CH_MIC LITERAL1
CH_JOYSTICK_SW LITERAL1
CH_JOYSTICK_X LITERAL1
CH_JOYSTICK_Y LITERAL1
SWITCH_1 LITERAL1
SWITCH_2 LITERAL1
SWITCH_3 LITERAL1
SWITCH_4 LITERAL1
SWITCH_DOWN LITERAL1
SWITCH_LEFT LITERAL1
SWITCH_UP LITERAL1
SWITCH_RIGHT LITERAL1
JOYSTICK_DOWN LITERAL1
JOYSTICK_LEFT LITERAL1
JOYSTICK_UP LITERAL1
PRESSED LITERAL1
RELEASED LITERAL1
DEGREES_C LITERAL1
DEGREES_F LITERAL1
X_AXIS LITERAL1
Y_AXIS LITERAL1
Z_AXIS LITERAL1

View File

@ -40,8 +40,8 @@ http://arduiniana.org.
//
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include "Arduino.h"
#include "SoftwareSerial.h"
#include <Arduino.h>
#include <SoftwareSerial.h>
//
// Lookup table
//
@ -70,6 +70,7 @@ static const DELAY_TABLE PROGMEM table[] =
{ 4800, 233, 474, 474, 471, },
{ 2400, 471, 950, 950, 947, },
{ 1200, 947, 1902, 1902, 1899, },
{ 600, 1902, 3804, 3804, 3800, },
{ 300, 3804, 7617, 7617, 7614, },
};
@ -91,6 +92,7 @@ static const DELAY_TABLE table[] PROGMEM =
{ 4800, 110, 233, 233, 230, },
{ 2400, 229, 472, 472, 469, },
{ 1200, 467, 948, 948, 945, },
{ 600, 948, 1895, 1895, 1890, },
{ 300, 1895, 3805, 3805, 3802, },
};
@ -115,6 +117,7 @@ static const DELAY_TABLE PROGMEM table[] =
{ 4800, 296, 595, 595, 592, },
{ 2400, 592, 1189, 1189, 1186, },
{ 1200, 1187, 2379, 2379, 2376, },
{ 600, 2379, 4759, 4759, 4755, },
{ 300, 4759, 9523, 9523, 9520, },
};

View File

@ -0,0 +1,129 @@
/*
WiFi Web Server LED Blink
A simple web server that lets you blink an LED via the web.
This sketch will print the IP address of your WiFi Shield (once connected)
to the Serial monitor. From there, you can open that address in a web browser
to turn on and off the LED on pin 9.
If the IP address of your shield is yourAddress:
http://yourAddress/H turns the LED on
http://yourAddress/L turns it off
This example is written for a network using WPA encryption. For
WEP or WPA, change the Wifi.begin() call accordingly.
Circuit:
* WiFi shield attached
* LED attached to pin 9
created 25 Nov 2012
by Tom Igoe
*/
#include <SPI.h>
#include <WiFi.h>
char ssid[] = "yourNetwork"; // your network SSID (name)
char pass[] = "secretPassword"; // your network password
int keyIndex = 0; // your network key Index number (needed only for WEP)
int status = WL_IDLE_STATUS;
WiFiServer server(80);
void setup() {
Serial.begin(9600); // initialize serial communication
pinMode(9, OUTPUT); // set the LED pin mode
// check for the presence of the shield:
if (WiFi.status() == WL_NO_SHIELD) {
Serial.println("WiFi shield not present");
while(true); // don't continue
}
// attempt to connect to Wifi network:
while ( status != WL_CONNECTED) {
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid); // print the network name (SSID);
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}
server.begin(); // start the web server on port 80
printWifiStatus(); // you're connected now, so print out the status
}
void loop() {
WiFiClient client = server.available(); // listen for incoming clients
if (client) { // if you get a client,
Serial.println("new client"); // print a message out the serial port
String currentLine = ""; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client's connected
if (client.available()) { // if there's bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
if (c == '\n') { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row.
// that's the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();
// the content of the HTTP response follows the header:
client.print("Click <a href=\"/H\">here</a> turn the LED on pin 9 on<br>");
client.print("Click <a href=\"/L\">here</a> turn the LED on pin 9 off<br>");
// The HTTP response ends with another blank line:
client.println();
// break out of the while loop:
break;
}
else { // if you got a newline, then clear currentLine:
currentLine = "";
}
}
else if (c != '\r') { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
// Check to see if the client request was "GET /H" or "GET /L":
if (currentLine.endsWith("GET /H")) {
digitalWrite(9, HIGH); // GET /H turns the LED on
}
if (currentLine.endsWith("GET /L")) {
digitalWrite(9, LOW); // GET /L turns the LED off
}
}
}
// close the connection:
client.stop();
Serial.println("client disonnected");
}
}
void printWifiStatus() {
// print the SSID of the network you're attached to:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print your WiFi shield's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.print(rssi);
Serial.println(" dBm");
// print where to go in a browser:
Serial.print("To see this page in action, open a browser to http://");
Serial.println(ip);
}

View File

@ -90,6 +90,9 @@
#undef OCR2_6
#undef OCR2_7
#define NUM_DIGITAL_PINS 30
#define NUM_ANALOG_INPUTS 12
#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0)
#define TXLED0 PORTD |= (1<<5)
#define TXLED1 PORTD &= ~(1<<5)
@ -204,7 +207,7 @@ const uint16_t PROGMEM port_to_input_PGM[] = {
(uint16_t) &PINF,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[30] = {
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PD, // D0 - PD2
PD, // D1 - PD3
PD, // D2 - PD1
@ -241,7 +244,7 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[30] = {
PD, // D29 / D12 - A11 - PD6
};
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[30] = {
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV(2), // D0 - PD2
_BV(3), // D1 - PD3
_BV(1), // D2 - PD1
@ -278,7 +281,7 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[30] = {
_BV(6), // D29 / D12 - A11 - PD6
};
const uint8_t PROGMEM digital_pin_to_timer_PGM[16] = {
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
@ -298,9 +301,24 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[16] = {
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
NOT_ON_TIMER,
};
const uint8_t PROGMEM analog_pin_to_channel_PGM[12] = {
const uint8_t PROGMEM analog_pin_to_channel_PGM[] = {
7, // A0 PF7 ADC7
6, // A1 PF6 ADC6
5, // A2 PF5 ADC5