diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Chapter 01/Chapter 1 Code Notes.txt b/Chapter 01/Chapter 1 Code Notes.txt deleted file mode 100644 index 4ee36a9..0000000 --- a/Chapter 01/Chapter 1 Code Notes.txt +++ /dev/null @@ -1,4 +0,0 @@ -Chapter 1 only uses the "blink" example that comes with the Arduino IDE. - -It is included here, but can also be loaded directly from the Arduino IDE -by navigating to File > Examples > 01.Basics > Blink within the IDE. \ No newline at end of file diff --git a/Chapter 01/README.md b/Chapter 01/README.md new file mode 100644 index 0000000..11c7971 --- /dev/null +++ b/Chapter 01/README.md @@ -0,0 +1,23 @@ +_Exploring Arduino:_ First Edition, Chapter 1 +============================================= +The code in this folder is for Chapter 1 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch1 + +Chapter 1 only uses the "blink" example that comes with the Arduino IDE. + +It is included here, but can also be loaded directly from the Arduino IDE +by navigating to `File > Examples > 01.Basics > Blink` within the IDE. + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 02/Chapter 2 Code Notes.txt b/Chapter 02/Chapter 2 Code Notes.txt deleted file mode 100644 index df9ffb9..0000000 --- a/Chapter 02/Chapter 2 Code Notes.txt +++ /dev/null @@ -1,9 +0,0 @@ -The Code in this folder is for Chapter 2 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch2 - -Listing 2-1: Turning on an LED /led -Listing 2-2: LED with Changing Blink Rate /blink -Listing 2-3: LED Fade Sketch /fade -Listing 2-4: Simple LED Control with a Button /led_button -Listing 2-5: Debounced Buttong Toggling /debounce -Listing 2-6: Toggling LED Nightlight /rgb_nightlight \ No newline at end of file diff --git a/Chapter 02/README.md b/Chapter 02/README.md new file mode 100644 index 0000000..3c20201 --- /dev/null +++ b/Chapter 02/README.md @@ -0,0 +1,25 @@ +_Exploring Arduino:_ First Edition, Chapter 2 +============================================= +The code in this folder is for Chapter 2 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch2 + +* Listing 2-1: Turning on an LED /led +* Listing 2-2: LED with Changing Blink Rate /blink +* Listing 2-3: LED Fade Sketch /fade +* Listing 2-4: Simple LED Control with a Button /led_button +* Listing 2-5: Debounced Buttong Toggling /debounce +* Listing 2-6: Toggling LED Nightlight /rgb_nightlight + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 02/debounce/debounce.ino b/Chapter 02/debounce/debounce.ino index 19f9715..189caef 100644 --- a/Chapter 02/debounce/debounce.ino +++ b/Chapter 02/debounce/debounce.ino @@ -38,7 +38,7 @@ boolean debounce(boolean last) void loop() { - currentButton = debounce(lastButton); //read deboucned state + currentButton = debounce(lastButton); //read debounced state if (lastButton == LOW && currentButton == HIGH) //if it was pressed… { ledOn = !ledOn; //toggle the LED value diff --git a/Chapter 02/rgb_nightlight/rgb_nightlight.ino b/Chapter 02/rgb_nightlight/rgb_nightlight.ino index 9fab097..f702284 100644 --- a/Chapter 02/rgb_nightlight/rgb_nightlight.ino +++ b/Chapter 02/rgb_nightlight/rgb_nightlight.ino @@ -69,7 +69,7 @@ void setMode(int mode) digitalWrite(BLED, HIGH); } //PURPLE (RED+BLUE) - if (mode == 4) + else if (mode == 4) { analogWrite(RLED, 127); analogWrite(GLED, 0); @@ -107,7 +107,7 @@ void setMode(int mode) void loop() { - currentButton = debounce(lastButton); //read deboucned state + currentButton = debounce(lastButton); //read debounced state if (lastButton == LOW && currentButton == HIGH) //if it was pressed... { ledMode++; //increment the LED value diff --git a/Chapter 03/Chapter 3 Code Notes.txt b/Chapter 03/Chapter 3 Code Notes.txt deleted file mode 100644 index d9d4471..0000000 --- a/Chapter 03/Chapter 3 Code Notes.txt +++ /dev/null @@ -1,6 +0,0 @@ -The Code in this folder is for Chapter 3 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch3 - -Listing 3-1: Potentiometer Reading Sketch /pot -Listing 3-2: Temperature Alert Sketch /tempalert -Listing 3-3: Automatic Night Light Sketch /nightlight \ No newline at end of file diff --git a/Chapter 03/README.md b/Chapter 03/README.md new file mode 100644 index 0000000..0a977bf --- /dev/null +++ b/Chapter 03/README.md @@ -0,0 +1,22 @@ +_Exploring Arduino:_ First Edition, Chapter 3 +============================================= +The code in this folder is for Chapter 3 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch3 + +* Listing 3-1: Potentiometer Reading Sketch /pot +* Listing 3-2: Temperature Alert Sketch /tempalert +* Listing 3-3: Automatic Night Light Sketch /nightlight + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 04/Chapter 4 Code Notes.txt b/Chapter 04/Chapter 4 Code Notes.txt deleted file mode 100644 index 29c3afe..0000000 --- a/Chapter 04/Chapter 4 Code Notes.txt +++ /dev/null @@ -1,8 +0,0 @@ -The Code in this folder is for Chapter 4 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch4 - -Listing 4-1: Automatic Speed Control /motor -Listing 4-2: Adjustable Speed Control /motor_pot -Listing 4-3: H-Bridge Potentiometer Motor Control /hbridge -Listing 4-4: Servo Potentiometer Control /servo -Listing 4-5: Sweeping Distance Sensor /sweep \ No newline at end of file diff --git a/Chapter 04/Chapter 4 Taking it Further.txt b/Chapter 04/Chapter 4 Taking it Further.txt deleted file mode 100644 index 2c42ec2..0000000 --- a/Chapter 04/Chapter 4 Taking it Further.txt +++ /dev/null @@ -1,8 +0,0 @@ -Taking It Further - Chapter 4 - -With your skills from this chapter, combined with your knowledge of analog and digital inputs and outputs and your growing knowledge of the Arduino programming knowledge, you are already equipped to do a number of exciting projects. You can accomplish the following few things by using knowledge you already have. Try building one of them or coming up with your own: -* A roving car with a scanning distance sensor that can avoid walls -* A motion-sensitive light -* A personal thermostat and fan (Fans are just DC motors with blades on them.) -* A code-activated lock box (Push debounced buttons in a certain order to disengage a servo motor.) -* A light-activated jack-in-the-box that uses a servo motor to pop up when you turn on the lights \ No newline at end of file diff --git a/Chapter 04/README.md b/Chapter 04/README.md new file mode 100644 index 0000000..d4bcfa9 --- /dev/null +++ b/Chapter 04/README.md @@ -0,0 +1,24 @@ +_Exploring Arduino:_ First Edition, Chapter 4 +============================================= +The code in this folder is for Chapter 4 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch4 + +* Listing 4-1: Automatic Speed Control /motor +* Listing 4-2: Adjustable Speed Control /motor_pot +* Listing 4-3: H-Bridge Potentiometer Motor Control /hbridge +* Listing 4-4: Servo Potentiometer Control /servo +* Listing 4-5: Sweeping Distance Sensor /sweep + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 05/Chapter 5 Code Notes.txt b/Chapter 05/Chapter 5 Code Notes.txt deleted file mode 100644 index 5054484..0000000 --- a/Chapter 05/Chapter 5 Code Notes.txt +++ /dev/null @@ -1,5 +0,0 @@ -The Code in this folder is for Chapter 5 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch5 - -Listing 5-1: Arduino Music Player /music -Listing 5-2: Pentatonic Micro Piano /piano \ No newline at end of file diff --git a/Chapter 05/Chapter 5 Taking it Further.txt b/Chapter 05/Chapter 5 Taking it Further.txt deleted file mode 100644 index f135c2e..0000000 --- a/Chapter 05/Chapter 5 Taking it Further.txt +++ /dev/null @@ -1,6 +0,0 @@ -Taking It Further - Chapter 5 - -Use the skills that you�ve picked up in this chapter to augment previous projects that you�ve worked on or to explore more on your own. Here are a few suggestions: -* Use a distance sensor to sound an alarm when somebody enters your room. -* Make music that responds to environmental conditions such as light and temperature. -* Make an audiovisual art installation that uses both lights and sounds to convey an idea or a mood. \ No newline at end of file diff --git a/Chapter 05/README.md b/Chapter 05/README.md new file mode 100644 index 0000000..b74ce80 --- /dev/null +++ b/Chapter 05/README.md @@ -0,0 +1,21 @@ +_Exploring Arduino:_ First Edition, Chapter 5 +============================================= +The code in this folder is for Chapter 5 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch5 + +* Listing 5-1: Arduino Music Player /music +* Listing 5-2: Pentatonic Micro Piano /piano + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 06/Chapter 6 Code Notes.txt b/Chapter 06/Chapter 6 Code Notes.txt deleted file mode 100644 index 9b027a5..0000000 --- a/Chapter 06/Chapter 6 Code Notes.txt +++ /dev/null @@ -1,15 +0,0 @@ -The Code in this folder is for Chapter 6 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch6 - -Listing 6-1: Potentiometer Serial Print Test Program /pot -Listing 6-2: Tabular Printing using Special Characters /pot_tabular -Listing 6-3: Arduino Serial Echo Test /echo -Listing 6-4: Single LED Control using Characters /single_char_control -Listing 6-5: RGB LED Control via Serial /list_control -Listing 6-6: Arduino Code to send Data to the Computer /pot_to_processing/arduino_read_pot -Listing 6-7: Processing Code to Read Data and Change Color on the Screen /pot_to_processing/processing_display_color -Listing 6-8: Processing Sketch to Set Arduino RGB Colors /processing_control_RGB/processing_control_RGB -Listing 6-5: RGB LED Control via Serial [USE AGAIN WITH 6-8 PROCESSING CODE] /processing_control_RGB/list_control -Listing 6-9: Temperature an Light Data Logger /csv_logger -Listing 6-10: Light-Based Computer Lock /lock_computer -Listing 6-11: Mouse Control Code for the Leonardo /mouse \ No newline at end of file diff --git a/Chapter 06/Chapter 6 Taking it Further.txt b/Chapter 06/Chapter 6 Taking it Further.txt deleted file mode 100644 index a3d88f7..0000000 --- a/Chapter 06/Chapter 6 Taking it Further.txt +++ /dev/null @@ -1,9 +0,0 @@ -Taking It Further - Chapter 6 - -Use the new skills you learned in this chapter to build exciting new projects! Here are some suggestions: -* Write a Processing sketch that connects to Twitter and tweets out an announcement every time your Arduino detects movement in your room. -* Use a Leonardo to make a gamepad that enables you to quickly execute key combinations for your favorite video game. -* Use a Leonardo to make a physical lock button for your computer that sends a screen lock key combination when a physical button is pressed. -* Hook up a dozen LEDs to your Arduino and create a Processing GUI to control each of them or to activate different flashing patterns. -* Use Processing to create a graphical display of analog values changing on ADC inputs to your Arduino. - diff --git a/Chapter 06/README.md b/Chapter 06/README.md new file mode 100644 index 0000000..4aac544 --- /dev/null +++ b/Chapter 06/README.md @@ -0,0 +1,31 @@ +_Exploring Arduino:_ First Edition, Chapter 6 +============================================= +The code in this folder is for Chapter 6 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch6 + +* Listing 6-1: Potentiometer Serial Print Test Program /pot +* Listing 6-2: Tabular Printing using Special Characters /pot_tabular +* Listing 6-3: Arduino Serial Echo Test /echo +* Listing 6-4: Single LED Control using Characters /single_char_control +* Listing 6-5: RGB LED Control via Serial /list_control +* Listing 6-6: Arduino Code to send Data to the Computer /pot_to_processing/arduino_read_pot +* Listing 6-7: Processing Code to Read Data and Change Color on the Screen /pot_to_processing/processing_display_color +* Listing 6-8: Processing Sketch to Set Arduino RGB Colors /processing_control_RGB/processing_control_RGB +* Listing 6-5: RGB LED Control via Serial [USE AGAIN WITH 6-8 PROCESSING CODE] /processing_control_RGB/list_control +* Listing 6-9: Temperature an Light Data Logger /csv_logger +* Listing 6-10: Light-Based Computer Lock /lock_computer +* Listing 6-11: Mouse Control Code for the Leonardo /mouse + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 06/csv_logger/csv_logger.ino b/Chapter 06/csv_logger/csv_logger.ino index 1ffda0e..202fbe0 100644 --- a/Chapter 06/csv_logger/csv_logger.ino +++ b/Chapter 06/csv_logger/csv_logger.ino @@ -22,16 +22,16 @@ int counter = 1; //An index for logged data entries void setup() { - pinMode (LED, OUTPUT); //Set blue LED as output + pinMode (LED, OUTPUT); //Set red LED as output Keyboard.begin(); //Start keyboard emulation } void loop() { - currentButton = debounce(lastButton); //Read deboucned state + currentButton = debounce(lastButton); //Read debounced state if (lastButton == LOW && currentButton == HIGH) //If it was pressed… - running = !running; //Toggle runnning state + running = !running; //Toggle running state lastButton = currentButton; //Reset button value diff --git a/Chapter 07/Chapter 7 Code Notes.txt b/Chapter 07/Chapter 7 Code Notes.txt deleted file mode 100644 index 1907b77..0000000 --- a/Chapter 07/Chapter 7 Code Notes.txt +++ /dev/null @@ -1,6 +0,0 @@ -The Code in this folder is for Chapter 7 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch7 - -Listing 7-1: Alternating LED Pattery on a Shift Register /alternate -Listing 7-2: Light Rider Sequence Code /lightrider -Listing 7-3: Bar Graph Distance Control /bargraph \ No newline at end of file diff --git a/Chapter 07/Chapter 7 Taking it Further.txt b/Chapter 07/Chapter 7 Taking it Further.txt deleted file mode 100644 index f8aee44..0000000 --- a/Chapter 07/Chapter 7 Taking it Further.txt +++ /dev/null @@ -1,6 +0,0 @@ -Taking It Further - Chapter 7 - -Using the new skills you learned in this chapter, paired with knowledge from previous chapters, you can experiment with some new projects: -* Daisy chain eight shift registers and make an enormous 8x8 64 LED display. You will need to use a separate 5V regulator to power the VCC pins on the shift registers, as this will consume more power than the Arduino�s built-in regulator can supply. The 5V L4940V5 linear regulator that you used in Chapter 5, �Using Transistors and Driving Motors,� will work well for this. -* Make a volume unit (VU) meter that responds to an analog input from a microphone. -* Make a physical bar graph that responds to mouse movements in a processing program running on your computer. \ No newline at end of file diff --git a/Chapter 07/README.md b/Chapter 07/README.md new file mode 100644 index 0000000..9a13df2 --- /dev/null +++ b/Chapter 07/README.md @@ -0,0 +1,22 @@ +_Exploring Arduino:_ First Edition, Chapter 7 +============================================= +The code in this folder is for Chapter 7 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch7 + +* Listing 7-1: Alternating LED Pattery on a Shift Register /alternate +* Listing 7-2: Light Rider Sequence Code /lightrider +* Listing 7-3: Bar Graph Distance Control /bargraph + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 08/Chapter 8 Code Notes.txt b/Chapter 08/Chapter 8 Code Notes.txt deleted file mode 100644 index 5be87b1..0000000 --- a/Chapter 08/Chapter 8 Code Notes.txt +++ /dev/null @@ -1,6 +0,0 @@ -The Code in this folder is for Chapter 8 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch8 - -Listing 8-1: I2C Temperature Sensor Printing Code /read_temp -Listing 8-2: I2C Temperature Sensors Code with Shift Register LEDs and Serial Communication /temp_unit -Listing 8-3: Processing Sketch for Displaying Temperature Values /display_temp \ No newline at end of file diff --git a/Chapter 08/Chapter 8 Taking it Further.txt b/Chapter 08/Chapter 8 Taking it Further.txt deleted file mode 100644 index cc829c7..0000000 --- a/Chapter 08/Chapter 8 Taking it Further.txt +++ /dev/null @@ -1,6 +0,0 @@ -Taking It Further - Chapter 8 - -Use I2C devices to enable all kinds of exciting new projects: -* Add an I2C DAC to your Arduino to enable true analog output. -* Add an I2C gyroscope or accelerometer to detect tilting and movement. -* Use an I2C barometric pressure sensor paired with the temperature and light sensors that you�ve already used to make a great weather station. diff --git a/Chapter 08/README.md b/Chapter 08/README.md new file mode 100644 index 0000000..24a83b1 --- /dev/null +++ b/Chapter 08/README.md @@ -0,0 +1,22 @@ +_Exploring Arduino:_ First Edition, Chapter 8 +============================================= +The code in this folder is for Chapter 8 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch8 + +* Listing 8-1: I2C Temperature Sensor Printing Code /read_temp +* Listing 8-2: I2C Temperature Sensors Code with Shift Register LEDs and Serial Communication /temp_unit +* Listing 8-3: Processing Sketch for Displaying Temperature Values /display_temp + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 09/Chapter 9 Code Notes.txt b/Chapter 09/Chapter 9 Code Notes.txt deleted file mode 100644 index f4c723e..0000000 --- a/Chapter 09/Chapter 9 Code Notes.txt +++ /dev/null @@ -1,5 +0,0 @@ -The Code in this folder is for Chapter 9 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch9 - -Listing 9-1: SPI Control of Multiple Digital Potentiometers /SPI_led -Listing 9-2: LED and Speaker Volume SPI Digital Potentiometer Control /LED_speaker \ No newline at end of file diff --git a/Chapter 09/Chapter 9 Taking it Further.txt b/Chapter 09/Chapter 9 Taking it Further.txt deleted file mode 100644 index d20addc..0000000 --- a/Chapter 09/Chapter 9 Taking it Further.txt +++ /dev/null @@ -1,7 +0,0 @@ -Taking It Further - Chapter 9 - -Use SPI devices to enable all kinds of exciting new projects: -* Add digital accelerometers and gyroscopes as sensors to your project. -* Utilize an SPI high-precision analog-to-digital converter to read analog signals with a higher degree of resolution than the Arduino can do on its own. -* Add an SPI thermocouple chip to facilitate super-accurate temperature measurements. -* Use the audiovisual platform developed in this chapter to build interactive art exhibits with lights and sounds. \ No newline at end of file diff --git a/Chapter 09/README.md b/Chapter 09/README.md new file mode 100644 index 0000000..2e66c0e --- /dev/null +++ b/Chapter 09/README.md @@ -0,0 +1,21 @@ +_Exploring Arduino:_ First Edition, Chapter 9 +============================================= +The code in this folder is for Chapter 9 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch9 + +* Listing 9-1: SPI Control of Multiple Digital Potentiometers /SPI_led +* Listing 9-2: LED and Speaker Volume SPI Digital Potentiometer Control /LED_speaker + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 10/Chapter 10 Code Notes.txt b/Chapter 10/Chapter 10 Code Notes.txt deleted file mode 100644 index f4a0093..0000000 --- a/Chapter 10/Chapter 10 Code Notes.txt +++ /dev/null @@ -1,6 +0,0 @@ -The Code in this folder is for Chapter 10 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch10 - -Listing 10-1: LCD Text with an Incrementing Number /LCD_text -Listing 10-2: LCD Updating Progress Bar Code /LCD_progress_bar -Listing 10-3: Personal Thermostat Program /LCD_thermostat \ No newline at end of file diff --git a/Chapter 10/Chapter 10 Taking it Further.txt b/Chapter 10/Chapter 10 Taking it Further.txt deleted file mode 100644 index 03c7f32..0000000 --- a/Chapter 10/Chapter 10 Taking it Further.txt +++ /dev/null @@ -1,6 +0,0 @@ -Taking It Further - Chapter 10 - -Having a display on your Arduino project opens an entire world of possibilities. Here are some project suggestions that you can now complete: -* Create a launch controller for your model rockets. -* Make a reaction timer that uses pushbuttons and an alert on the LCD to time how quickly you can press the button once prompted. -* Make an infrared measuring tape that determines distances and tells them to you using the LCD. diff --git a/Chapter 10/README.md b/Chapter 10/README.md new file mode 100644 index 0000000..e7247d8 --- /dev/null +++ b/Chapter 10/README.md @@ -0,0 +1,22 @@ +_Exploring Arduino:_ First Edition, Chapter 10 +============================================== +The code in this folder is for Chapter 10 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch10 + +* Listing 10-1: LCD Text with an Incrementing Number /LCD_text +* Listing 10-2: LCD Updating Progress Bar Code /LCD_progress_bar +* Listing 10-3: Personal Thermostat Program /LCD_thermostat + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 11/Chapter 11 Code Notes.txt b/Chapter 11/Chapter 11 Code Notes.txt deleted file mode 100644 index d851557..0000000 --- a/Chapter 11/Chapter 11 Code Notes.txt +++ /dev/null @@ -1,9 +0,0 @@ -The Code in this folder is for Chapter 11 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch11 - -Listing 11-1: Arduino Code to send Data to the Computer /pot_to_processing/arduino_read_pot -Listing 11-2: Processing Code to Read Data and Change Color on the Screen /pot_to_processing/processing_display_color -Listing 11-3: RGB LED Control via Serial /processing_control_RGB/list_control -Listing 11-4: Processing Sketch to Set Arduino RGB Colors /processing_control_RGB/processing_control_RGB -Listing 11-5: Doorbell Transmitter /doorbell/transmitting_arduino -Listing 11-6: Doorbell Receiver /doorbell/receiving_arduino \ No newline at end of file diff --git a/Chapter 11/Chapter 11 Taking it Further.txt b/Chapter 11/Chapter 11 Taking it Further.txt deleted file mode 100644 index e90ea6d..0000000 --- a/Chapter 11/Chapter 11 Taking it Further.txt +++ /dev/null @@ -1,7 +0,0 @@ -Taking It Further - Chapter 11 - -Without wires holding you back, the possibilities are limitless! Here are some project suggestions that you can now complete: -* Build the SudoGlove control system (http://www.sudoglove.com). -* Build a wireless multimedia remote for your computer by using Leonardo keyboard emulation on a receiving Arduino. -* Build a remote-controlled car -* Build a remote weather station and monitor it from your computer or from another Arduino with data displayed on an LCD. \ No newline at end of file diff --git a/Chapter 11/README.md b/Chapter 11/README.md new file mode 100644 index 0000000..957d7ac --- /dev/null +++ b/Chapter 11/README.md @@ -0,0 +1,25 @@ +_Exploring Arduino:_ First Edition, Chapter 11 +============================================== +The code in this folder is for Chapter 11 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch11 + +* Listing 11-1: Arduino Code to send Data to the Computer /pot_to_processing/arduino_read_pot +* Listing 11-2: Processing Code to Read Data and Change Color on the Screen /pot_to_processing/processing_display_color +* Listing 11-3: RGB LED Control via Serial /processing_control_RGB/list_control +* Listing 11-4: Processing Sketch to Set Arduino RGB Colors /processing_control_RGB/processing_control_RGB +* Listing 11-5: Doorbell Transmitter /doorbell/transmitting_arduino +* Listing 11-6: Doorbell Receiver /doorbell/receiving_arduino + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 12/Chapter 12 Code Notes.txt b/Chapter 12/Chapter 12 Code Notes.txt deleted file mode 100644 index 6c3d41b..0000000 --- a/Chapter 12/Chapter 12 Code Notes.txt +++ /dev/null @@ -1,6 +0,0 @@ -The Code in this folder is for Chapter 12 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch12 - -Listing 12-1: Hardware Interrupts for Multitasking /hw_multitask -Listing 12-2: Simple Timer Interrupt Blink Test /timer1 -Listing 12-3: Sound Machine Code /fun_with_sound \ No newline at end of file diff --git a/Chapter 12/Chapter 12 Taking it Further.txt b/Chapter 12/Chapter 12 Taking it Further.txt deleted file mode 100644 index ce51885..0000000 --- a/Chapter 12/Chapter 12 Taking it Further.txt +++ /dev/null @@ -1,7 +0,0 @@ -Taking It Further - Chapter 12 - -Interrupts allow you build interesting new asynchronous projects. Here are some project suggestions that you can now complete: -* Build a reaction timer game that tests how quickly you can press a button when a light turns on. -* Build a cyclometer for your bike that determines speed by triggering a magnetic reed switch every time a magnet on your tire spoke spins by it. -* Build a feedback control system for a DC motor that uses a rotary encoder to determine motor speed. -* Integrate a blinking status LED into your existing projects that doesn�t interfere with the timing of the rest of your program. diff --git a/Chapter 12/README.md b/Chapter 12/README.md new file mode 100644 index 0000000..d1f2002 --- /dev/null +++ b/Chapter 12/README.md @@ -0,0 +1,22 @@ +_Exploring Arduino:_ First Edition, Chapter 12 +============================================== +The code in this folder is for Chapter 12 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch12 + +* Listing 12-1: Hardware Interrupts for Multitasking /hw_multitask +* Listing 12-2: Simple Timer Interrupt Blink Test /timer1 +* Listing 12-3: Sound Machine Code /fun_with_sound + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 12/fun_with_sound/fun_with_sound.ino b/Chapter 12/fun_with_sound/fun_with_sound.ino index 2237926..53147db 100644 --- a/Chapter 12/fun_with_sound/fun_with_sound.ino +++ b/Chapter 12/fun_with_sound/fun_with_sound.ino @@ -41,7 +41,7 @@ void setup() //Set up timer interrupt Timer1.initialize(500000); // (.5 seconds) - Timer1.attachInterrupt(changePitch); //Runs "changePitch" on each timer interupt + Timer1.attachInterrupt(changePitch); //Runs "changePitch" on each timer interrupt } void changeKey() diff --git a/Chapter 12/timer1/timer1.ino b/Chapter 12/timer1/timer1.ino index 2d387c8..b5f0b14 100644 --- a/Chapter 12/timer1/timer1.ino +++ b/Chapter 12/timer1/timer1.ino @@ -16,7 +16,7 @@ void setup() { pinMode(LED, OUTPUT); Timer1.initialize(1000000); // set a timer of length 1000000 microseconds (1 second) - Timer1.attachInterrupt(blinky); //Runs "blinky" on each timmer interrupt + Timer1.attachInterrupt(blinky); //Runs "blinky" on each timer interrupt } void loop() diff --git a/Chapter 13/Chapter 13 Code Notes.txt b/Chapter 13/Chapter 13 Code Notes.txt deleted file mode 100644 index 24981e2..0000000 --- a/Chapter 13/Chapter 13 Code Notes.txt +++ /dev/null @@ -1,7 +0,0 @@ -The Code in this folder is for Chapter 13 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch13 - -Listing 13-1: SD Card Write Test /write_to_sd -Listing 13-2: SD Reading and Writing /sd_read_write -Listing 13-3: SD Reading and Writing with an RTC /sd_read_write_rtc -Listing 13-4: Entrance Logger Software /entrance_logger \ No newline at end of file diff --git a/Chapter 13/Chapter 13 Taking it Further.txt b/Chapter 13/Chapter 13 Taking it Further.txt deleted file mode 100644 index a7d0234..0000000 --- a/Chapter 13/Chapter 13 Taking it Further.txt +++ /dev/null @@ -1,7 +0,0 @@ -Taking It Further - Chapter 13 - -You can use data logging in many different ways. Here are some project suggestions that you can now complete: -* Build a data logger for an autonomous vehicle or aircraft. -* Build a wireless weather station that stores weather history. -* Build a home-efficiency monitor that monitors when you forget to turn your lights off. -* Build a temperature logger that records how frequently the compressor switches on inside your air conditioner or refrigerator. \ No newline at end of file diff --git a/Chapter 13/README.md b/Chapter 13/README.md new file mode 100644 index 0000000..0dbff8f --- /dev/null +++ b/Chapter 13/README.md @@ -0,0 +1,23 @@ +_Exploring Arduino:_ First Edition, Chapter 13 +============================================== +The code in this folder is for Chapter 13 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch13 + +* Listing 13-1: SD Card Write Test /write_to_sd +* Listing 13-2: SD Reading and Writing /sd_read_write +* Listing 13-3: SD Reading and Writing with an RTC /sd_read_write_rtc +* Listing 13-4: Entrance Logger Software /entrance_logger + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/Chapter 14/Chapter 14 Code Notes.txt b/Chapter 14/Chapter 14 Code Notes.txt deleted file mode 100644 index 0803b33..0000000 --- a/Chapter 14/Chapter 14 Code Notes.txt +++ /dev/null @@ -1,7 +0,0 @@ -The Code in this folder is for Chapter 14 of "Exploring Arduino" -http://www.exploringarduino.com/content/ch14 - -Listing 14-1: HTML Form Page /server_form -Listing 14-2: Web Server Code /control_led_speaker -Listing 14-3: Xively Datastream Upload /xively -Listing 14-4: Xively Datastream Upload Code Updated to Read Multiple Sensors /cosm2 \ No newline at end of file diff --git a/Chapter 14/Chapter 14 Taking it Further.txt b/Chapter 14/Chapter 14 Taking it Further.txt deleted file mode 100644 index 283ae96..0000000 --- a/Chapter 14/Chapter 14 Taking it Further.txt +++ /dev/null @@ -1,7 +0,0 @@ -Taking It Further - Chapter 14 - -Now that your Arduino can get on the web, the sky is the limit. Here are some project suggestions that you can now complete: -* Make a web-controlled robotic claw. -* Construct a remote pet feeder. Allow your pet to trigger it with a motion sensor, or set it to a timer with a real time clock. -* Create a monitoring system for the amount of sunlight your plants are receiving. -* Assemble an array of LEDs that flash various colors to tell you when you�ve received an email, a tweet, and so on. diff --git a/Chapter 14/README.md b/Chapter 14/README.md new file mode 100644 index 0000000..40d655f --- /dev/null +++ b/Chapter 14/README.md @@ -0,0 +1,23 @@ +_Exploring Arduino:_ First Edition, Chapter 14 +============================================== +The code in this folder is for Chapter 14 of the FIRST EDITION of "Exploring Arduino" +https://www.exploringarduino.com/content1/ch14 + +* Listing 14-1: HTML Form Page /server_form +* Listing 14-2: Web Server Code /control_led_speaker +* Listing 14-3: Xively Datastream Upload /xively +* Listing 14-4: Xively Datastream Upload Code Updated to Read Multiple Sensors /cosm2 + +Open Source License +------------------- +* All Code Copyright 2013 Jeremy E. Blum, Blum Idea Labs, LLC. +* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 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. See the GNU General Public License for more details. +* A copy of the GNU General Public License is included along with this software. It can also be found [here](http://www.gnu.org/licenses/). + +Sharing +------- +Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. +* Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index a0d27c6..06d72c6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -3,7 +3,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 -Copyright © 2007 Free Software Foundation, Inc. <> +Copyright © 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -68,34 +68,34 @@ The precise terms and conditions for copying, distribution and modification foll ### 0. Definitions. -“This License” refers to version 3 of the GNU General Public License. +"This License" refers to version 3 of the GNU General Public License. -“Copyright” also means copyright-like laws that apply to other kinds of +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. -“The Program” refers to any copyrightable work licensed under this -License. Each licensee is addressed as “you”. “Licensees” and -“recipients” may be individuals or organizations. +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. -To “modify” a work means to copy from or adapt all or part of the work in +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The -resulting work is called a “modified version” of the earlier work or a -work “based on” the earlier work. +resulting work is called a "modified version" of the earlier work or a +work "based on" the earlier work. -A “covered work” means either the unmodified Program or a work based on +A "covered work" means either the unmodified Program or a work based on the Program. -To “propagate” a work means to do anything with it that, without +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. -To “convey” a work means any kind of propagation that enables other +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. -An interactive user interface displays “Appropriate Legal Notices” to the +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that @@ -105,26 +105,26 @@ menu, a prominent item in the list meets this criterion. ### 1. Source Code. -The “source code” for a work means the preferred form of the work for -making modifications to it. “Object code” means any non-source form of a +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of a work. -A “Standard Interface” means an interface that either is an official +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. -The “System Libraries” of an executable work include anything, other than +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. -A “Major Component”, in this context, means a major essential component +A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. -The “Corresponding Source” for a work in object code form means all the +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or @@ -198,7 +198,7 @@ you also meet all of these conditions: relevant date. * b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the -requirement in section 4 to “keep intact all notices”. +requirement in section 4 to "keep intact all notices". * c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, @@ -212,7 +212,7 @@ Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution -medium, is called an “aggregate” if the compilation and its resulting +medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. @@ -257,19 +257,19 @@ A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. -A “User Product” is either (1) a “consumer product”, which +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a -particular user, “normally used” refers to a typical or common use of +particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. -“Installation Information” for a User Product means any methods, +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued @@ -299,7 +299,7 @@ special password or key for unpacking, reading or copying. ### 7. Additional Terms. -“Additional permissions” are terms that supplement the terms of this +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable @@ -334,8 +334,8 @@ who conveys the material (or modified versions of it) with contractual assumptio liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. -All other non-permissive additional terms are considered “further -restrictions” within the meaning of section 10. If the Program as you received +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying @@ -392,7 +392,7 @@ from the original licensors, to run, modify and propagate that work, subject to License. You are not responsible for enforcing compliance by third parties with this License. -An “entity transaction” is a transaction transferring control of an +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also @@ -410,16 +410,16 @@ importing the Program or any portion of it. ### 11. Patents. -A “contributor” is a copyright holder who authorizes use under this +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus -licensed is called the contributor's “contributor version”. +licensed is called the contributor's "contributor version". -A contributor's “essential patent claims” are all patent claims owned or +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For -purposes of this definition, “control” includes the right to grant patent +purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license @@ -427,10 +427,10 @@ under the contributor's essential patent claims, to make, use, sell, offer for s import and otherwise run, modify and propagate the contents of its contributor version. -In the following three paragraphs, a “patent license” is any express +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent -infringement). To “grant” such a patent license to a party means to make +infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the @@ -440,7 +440,7 @@ other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream -recipients. “Knowingly relying” means you have actual knowledge that, but +recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. @@ -452,7 +452,7 @@ propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. -A patent license is “discriminatory” if it does not include within the +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with @@ -496,8 +496,8 @@ General Public License from time to time. Such new versions will be similar in s 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 Program specifies that -a certain numbered version of the GNU General Public License “or any later -version” applies to it, you have the option of following the terms and +a certain numbered version of the GNU General Public License "or any later +version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free @@ -515,7 +515,7 @@ your choosing to follow a later version. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE @@ -550,7 +550,7 @@ can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; -and each file should have at least the “copyright” line and a pointer to +and each file should have at least the "copyright" line and a pointer to where the full notice is found. @@ -581,16 +581,15 @@ when it starts in an interactive mode: The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; -for a GUI interface, you would use an “about box”. +for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to -sign a “copyright disclaimer” for the program, if necessary. For more +sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -<>. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this -License. But first, please read -<>. \ No newline at end of file +License. But first, please read . \ No newline at end of file diff --git a/README.md b/README.md index 8079f66..5c89428 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -Exploring Arduino: Tools and Techniques for Engineering Wizardry -================================================================ -These are the code files that accompany the *Exploring Arduino* book by [Jeremy Blum](http://www.jeremyblum.com) ----------------------------------------------------------------------------------------------------------------- -These are the most up-to-date versions of the code examples provided within the book. +_Exploring Arduino:_ 1st Edition +================================ +_These are the code files that accompany the 1st Edition of the [*Exploring Arduino* book](https://www.exploringarduino.com) by [Jeremy Blum](https://www.jeremyblum.com)_ -All of the code within the book is tested and confirmed to work with the provided example scenarios. However, I may choose to make improvements or adjustments to the code over time. When I make changes, they will always be available for download here. Futhermore, changes that I commit to this GitHub repository will automatically be zipped and pushed to the [Exploring Arduino Website](http://www.exploringarduino.com/content). For those unfamiliar with GitHub or git version control, I recommend that you visit the Exploring Arduino Website to download zip files containing the code for each chapter in this book. +These are the most up-to-date versions of the code examples provided within the 1st Edition book. If you have the 2nd Edition of the book, please visit the [2nd Edition GitHub Repo](https://github.com/sciguy14/Exploring-Arduino-2nd-Edition). + +All of the code within the book is tested and confirmed to work with the provided example scenarios. However, I may choose to make improvements or adjustments to the code over time. When I make changes, they will always be available for download here. Futhermore, changes that I commit to this GitHub repository will automatically be zipped and pushed to the [Exploring Arduino Website](https://www.exploringarduino.com/content1). For those unfamiliar with GitHub or git version control, I recommend that you visit the Exploring Arduino Website to download zip files containing the code for each chapter in this book. Open Source License ------------------- @@ -16,6 +16,6 @@ Open Source License Sharing ------- Under the GNU GPL, you are free to do whatever you want with this provided code. However, I'd really appreciate it if you could do the following things when re-using any code that I have released for this book: -* Provide attribution at the top of your code, like this "This code adapted from code by Jeremy Blum (www.jeremyblum.com), for the "Exploring Arduino" book (www.exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL." -* If you make something awesome with the help of this book and/or my code examples, please let me know - I'd love to hear about it! You can hit me up on [twitter](http://www.twitter.com/sciguy14) or via [my website](http://www.jeremyblum.com/contact). +* Provide attribution at the top of your code, like this: `This code adapted from code by Jeremy Blum (jeremyblum.com), for his book: "Exploring Arduino" (exploringarduino.com). Its use and modifcation are permitted under the terms of the GNU GPL.` +* If you make something awesome with the help of this book and/or my code examples, I'd love to hear about it! Post it on social media with the hashtag: **#ExploringArduino**. * Share! If you make something awesome, please consider releasing it as an open source project so other people can learn from what you've done. \ No newline at end of file