├── ModuleHumTempSensor ├── CHANGES.txt ├── DISTRIBUTION ├── ModuleHumTempSensor.ino ├── README.markdown ├── SHT1x.cpp └── SHT1x.h ├── Module_COSensor ├── CO_Sensor │ ├── COS_MQ7.cpp │ ├── COS_MQ7.h │ └── CO_Sensor.ino ├── notes.txt └── outputs │ ├── First_70m_cooking.png │ ├── Rplot.png │ ├── Rplot01.png │ ├── analysis.R │ ├── burning.txt │ ├── butane_exposure.txt │ ├── li-ion_output.txt │ ├── output.txt │ ├── output2.txt │ ├── output3.txt │ ├── output4.txt │ ├── output5.txt │ ├── output6.txt │ ├── output7.txt │ ├── post_burn_output.txt │ └── unstable_readings.png ├── Module_Dust-GPS-OpenLog-Baro ├── Adafruit_BMP085 │ ├── Adafruit_BMP085.cpp │ ├── Adafruit_BMP085.h │ ├── README.txt │ └── examples │ │ └── BMP085test │ │ └── BMP085test.pde ├── Adafruit_GPS │ ├── Adafruit_GPS.cpp │ ├── Adafruit_GPS.h │ ├── README.txt │ ├── examples │ │ ├── blank │ │ │ └── blank.pde │ │ ├── echo │ │ │ └── echo.pde │ │ ├── flora_dumplog │ │ │ └── flora_gpsdump.ino │ │ ├── flora_gpslog │ │ │ └── flora_gpslog.ino │ │ ├── flora_gpstest │ │ │ └── flora_gpstest.ino │ │ ├── flora_parsing │ │ │ └── flora_parsing.ino │ │ ├── locus_dumpbasic │ │ │ └── locus_dumpbasic.pde │ │ ├── locus_erase │ │ │ └── locus_erase.pde │ │ ├── locus_start │ │ │ └── locus_start.pde │ │ ├── locus_status │ │ │ └── locus_status.pde │ │ └── parsing │ │ │ └── parsing.pde │ └── license.txt └── dustSensor_SD_GPS_Baro.ino ├── Module_Dust-GPS-OpenLog ├── README.md ├── assembly │ ├── ArduinoFio_OpenLog_GPS_Sharp.fzz │ └── _Blog Images │ │ ├── gps_sd_zoom.JPG │ │ └── overall_setup.JPG └── dustSensor_SD_GPS.ino ├── Module_Dust-Sensor ├── README.md ├── assembly │ ├── Arduino_Fio_Sketch_Fritzing.fzz │ ├── Arduino_Fio_Sketch_Fritzing_schem.jpg │ ├── Arduino_Fio_Sketch_Fritzing_schem.svg │ ├── Arduino_Fio_Sketch_Fritzing_schem_small.jpg │ └── _BlogImages │ │ ├── ArduinoUno_Dust4.JPG │ │ ├── Arduino_Dust1.JPG │ │ ├── Arduino_Dust2.JPG │ │ ├── Arduino_Dust3.JPG │ │ ├── SharpDensitycurve.PNG │ │ ├── Sharp_PulseWidth.PNG │ │ ├── Sharp_Sampling.PNG │ │ └── sharpFromDoc.png ├── dustSensor │ └── dustSensor.ino └── example │ ├── serial_output_Fio.txt │ └── serial_output_Uno.txt ├── Module_GPS └── README.md ├── OpenLogSerialTest ├── OpenLogSerialTest.ino └── openlog_breadboard.jpg ├── README.md ├── Sensor_outputs └── 2014_01_26.txt ├── aq5s ├── Adafruit_BMP085.cpp ├── Adafruit_BMP085.h ├── Adafruit_GPS.cpp ├── Adafruit_GPS.h ├── GPS │ ├── README.txt │ └── license.txt ├── SHT1x.cpp ├── SHT1x.h ├── aq5s.ino └── sht1x │ ├── CHANGES.txt │ ├── DISTRIBUTION │ └── README.markdown ├── aq6s ├── Adafruit_BMP085_U.cpp ├── Adafruit_BMP085_U.h ├── Adafruit_GPS.cpp ├── Adafruit_GPS.h ├── Adafruit_Sensor.cpp ├── Adafruit_Sensor.h ├── CONFIG.TXT ├── COS_MQ7.cpp ├── COS_MQ7.h ├── README.md ├── SHT1x.cpp ├── SHT1x.h ├── StandardCpp │ ├── .gitignore │ ├── Jamfile │ ├── Makefile │ ├── README.md │ ├── StandardCplusplus.h │ ├── algorithm │ ├── algorithm.cpp │ ├── associative_base │ ├── associative_base.cpp │ ├── basic_definitions │ ├── bitset │ ├── bitset.cpp │ ├── cassert │ ├── cctype │ ├── cerrno │ ├── cfloat │ ├── char_traits │ ├── char_traits.cpp │ ├── climits │ ├── clocale │ ├── cmath │ ├── complex │ ├── complex.cpp │ ├── csetjmp │ ├── csignal │ ├── cstdarg │ ├── cstddef │ ├── cstdio │ ├── cstdlib │ ├── cstring │ ├── ctime │ ├── cwchar │ ├── cwctype │ ├── del_op.cpp │ ├── del_opnt.cpp │ ├── del_opv.cpp │ ├── del_opvnt.cpp │ ├── deque │ ├── deque.cpp │ ├── eh_alloc.cpp │ ├── eh_globals.cpp │ ├── examples │ │ ├── serstream │ │ │ ├── Jamfile │ │ │ ├── more.cpp │ │ │ ├── runtests.sh │ │ │ ├── serstream.ino │ │ │ └── test.ex │ │ └── string_vector │ │ │ ├── Jamfile │ │ │ └── string_vector.ino │ ├── exception │ ├── exception.cpp │ ├── fstream │ ├── fstream.cpp │ ├── func_exception │ ├── func_exception.cpp │ ├── functional │ ├── initializer_list │ ├── iomanip │ ├── iomanip.cpp │ ├── ios │ ├── ios.cpp │ ├── iosfwd │ ├── iostream │ ├── iostream.cpp │ ├── istream │ ├── istream.cpp │ ├── istream_helpers │ ├── iterator │ ├── iterator.cpp │ ├── iterator_base │ ├── limits │ ├── limits.cpp │ ├── list │ ├── list.cpp │ ├── locale │ ├── locale.cpp │ ├── map │ ├── map.cpp │ ├── memory │ ├── new │ ├── new_handler.cpp │ ├── new_op.cpp │ ├── new_opnt.cpp │ ├── new_opv.cpp │ ├── new_opvnt.cpp │ ├── numeric │ ├── numeric.cpp │ ├── ostream │ ├── ostream.cpp │ ├── ostream_helpers │ ├── queue │ ├── queue.cpp │ ├── serstream │ ├── set │ ├── set.cpp │ ├── sstream │ ├── sstream.cpp │ ├── stack │ ├── stack.cpp │ ├── stdexcept │ ├── stdexcept.cpp │ ├── streambuf │ ├── streambuf.cpp │ ├── string │ ├── string.cpp │ ├── string_iostream │ ├── support │ ├── support.cpp │ ├── system_configuration.h │ ├── type_traits │ ├── typeinfo │ ├── typeinfo.cpp │ ├── uartbuf │ ├── unwind-cxx.h │ ├── utility.cpp │ ├── utility.h │ ├── valarray │ ├── valarray.cpp │ ├── vector │ └── vector.cpp ├── aq6s.ino └── outputs │ ├── 2014-02-09 21.30.06.jpg │ └── 2014-02-09.txt ├── battery_holder ├── battery_holder.skp ├── battery_holder.stl ├── battery_holder_stretch.dae ├── battery_holder_stretch.gcode ├── battery_holder_stretch.skp ├── battery_holder_stretch_light.dae ├── battery_holder_stretch_light.gcode ├── battery_holder_stretch~.skp └── battery_holder~.skp ├── documentation ├── 27904-Gas-Sensor-Modules-Guide-v2.3.pdf ├── 27983-Gas-Sensor-Board-A-Schematic.pdf ├── Arduino-Fio-schematic.pdf ├── MQ-7.pdf ├── Pololu 5V Step-Up-Step-Down Voltage Regulator S7V7F5.webloc ├── Pololu 5V Step-UpStep-Down Voltage Regulator S7V7F5.desktop ├── S9014.pdf ├── adafruit-ultimate-gps.pdf └── gp2y1010au_e.pdf └── schematics ├── Eagle ├── External parts │ ├── Adafruit-Eagle-Library-master │ │ ├── README.md │ │ ├── README.txt │ │ └── adafruit.lbr │ ├── Adafruit-Ultimate-GPS-master.zip │ ├── Adafruit-Ultimate-GPS-master │ │ ├── Adafruit Ultimate GPS.brd │ │ └── Adafruit Ultimate GPS.sch │ └── microbuilderlibrary_v2 │ │ ├── License.txt.txt │ │ └── microbuilder.lbr ├── Screen Shot 2014-04-05 at 9.56.28 PM.png ├── air_quality_parts.l#1 ├── air_quality_parts.l#2 ├── air_quality_parts.l#3 ├── air_quality_parts.l#4 ├── air_quality_parts.l#5 ├── air_quality_parts.l#6 ├── air_quality_parts.l#7 ├── air_quality_parts.l#8 ├── aq6.b#1 ├── aq6.b#2 ├── aq6.s#1 ├── aq6.s#2 ├── aq6.s#3 └── aq6s │ ├── DESCRIPTION │ ├── air_quality_parts.l#1 │ ├── air_quality_parts.l#2 │ ├── air_quality_parts.l#3 │ ├── air_quality_parts.l#4 │ ├── air_quality_parts.l#5 │ ├── air_quality_parts.l#6 │ ├── air_quality_parts.l#7 │ ├── air_quality_parts.l#8 │ ├── air_quality_parts.l#9 │ ├── air_quality_parts.lbr │ ├── aq6.b#1 │ ├── aq6.b#2 │ ├── aq6.b#3 │ ├── aq6.b#4 │ ├── aq6.b#5 │ ├── aq6.b#6 │ ├── aq6.b#7 │ ├── aq6.b#8 │ ├── aq6.b#9 │ ├── aq6.brd │ ├── aq6.s#1 │ ├── aq6.s#2 │ ├── aq6.s#3 │ ├── aq6.s#4 │ ├── aq6.s#5 │ ├── aq6.s#6 │ ├── aq6.s#7 │ ├── aq6.s#8 │ ├── aq6.s#9 │ ├── aq6.sch │ ├── eagle.epf │ └── pcb_design │ ├── both.png │ ├── both.pxm │ ├── bottom.png │ ├── export_dbl_sided.scr │ └── top.png └── Fritzing ├── aq6s.fzz ├── aq6s_bb.pdf └── pcb ├── aq6s_etch_copper_bottom.pdf ├── aq6s_etch_copper_bottom.svg ├── aq6s_etch_copper_bottom_mirror.pdf ├── aq6s_etch_copper_bottom_mirror.svg ├── aq6s_etch_copper_top.pdf ├── aq6s_etch_copper_top.svg ├── aq6s_etch_copper_top_mirror.pdf ├── aq6s_etch_copper_top_mirror.svg ├── aq6s_etch_mask_bottom.pdf ├── aq6s_etch_mask_bottom.svg ├── aq6s_etch_mask_bottom_mirror.pdf ├── aq6s_etch_mask_bottom_mirror.svg ├── aq6s_etch_mask_top.pdf ├── aq6s_etch_mask_top.svg ├── aq6s_etch_mask_top_mirror.pdf ├── aq6s_etch_mask_top_mirror.svg ├── aq6s_etch_paste_mask_bottom.pdf ├── aq6s_etch_paste_mask_bottom.svg ├── aq6s_etch_paste_mask_bottom_mirror.pdf ├── aq6s_etch_paste_mask_bottom_mirror.svg ├── aq6s_etch_paste_mask_top.pdf ├── aq6s_etch_paste_mask_top.svg ├── aq6s_etch_paste_mask_top_mirror.pdf ├── aq6s_etch_paste_mask_top_mirror.svg ├── aq6s_etch_silk_bottom.pdf ├── aq6s_etch_silk_bottom.svg ├── aq6s_etch_silk_bottom_mirror.pdf ├── aq6s_etch_silk_bottom_mirror.svg ├── aq6s_etch_silk_top.pdf ├── aq6s_etch_silk_top.svg ├── aq6s_etch_silk_top_mirror.pdf └── aq6s_etch_silk_top_mirror.svg /ModuleHumTempSensor/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 2013-03-16 2 | * Renamed and moved files, changed #include path, now works out of the box with arduino 3 | 2013-02-22 4 | * Completely changed the library to handle Arduion Fio's 3.3V. 5 | * Minor fixes/cleaning 6 | * Removed fahrenheit functions for temperature 7 | * Removed direct temperature requests, can only be requested after a humidity request (this prevents too many sequential temperature requests which will heat the sensor... (humidity request do a temperature request, we hold this for later retrieval) 8 | 9 | 2011-09-20 10 | * Conditionally include Arduino.h for compatibility with Arduino 1.0 11 | 12 | 2010-07-23 13 | * Added SHT7x to list of supported sensors. 14 | * Fixed temperature offset in humidity calculation. 15 | -------------------------------------------------------------------------------- /ModuleHumTempSensor/DISTRIBUTION: -------------------------------------------------------------------------------- 1 | Copyright 2009 Jonathan Oxer / 2 | Copyright 2008 Maurice Ribble / 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | http://www.gnu.org/licenses/ 10 | -------------------------------------------------------------------------------- /ModuleHumTempSensor/ModuleHumTempSensor.ino: -------------------------------------------------------------------------------- 1 | /** 2 | * Humidity - Temperature sensor module 3 | * Cyrille Medard de Chardon, Christophe Trefois 4 | */ 5 | 6 | #include "SHT1x.h" 7 | #define dataPin 7 8 | #define sckPin 8 //serial clock 9 | 10 | // We are using the SHT10 11 | // Humid accuracy +/- 5% 12 | // Steady accuracy between 10-80 13 | // example at 10/90 +/- 6%, 0/100 +/- 7.5% 14 | 15 | // Temp accuracy +/- .5 degrees celsius 16 | // Temp error increases more as we get farther from 25 cels. 17 | // example: @ 0/50 degrees, +/- 1.2 degrees 18 | 19 | SHT1x th_sensor(dataPin, sckPin); 20 | 21 | void setup() 22 | { 23 | Serial.begin(9600); 24 | Serial.println("Starting up"); 25 | } 26 | 27 | void loop() 28 | { 29 | float temp_c; 30 | float humid; 31 | 32 | // Read values from the sensor 33 | humid = th_sensor.readHumidity(); 34 | // Since the humidity reading requires the temperature we simply 35 | // retrieve the reading capture from the readHumidity() call. See the lib. 36 | temp_c = th_sensor.retrieveTemperatureC(); 37 | 38 | // Print data 39 | Serial.print("Temperature: "); 40 | Serial.print(temp_c); 41 | Serial.print(", Humidity: "); 42 | Serial.println(humid); 43 | 44 | delay(4000); 45 | } 46 | -------------------------------------------------------------------------------- /ModuleHumTempSensor/README.markdown: -------------------------------------------------------------------------------- 1 | SHT1x Temperature / Humidity Sensor Library for Arduino 2 | ======================================================= 3 | Heavily modified by Cyrille Medard de Chardon from the original creator's version: 4 | 5 | Copyright 2009 Jonathan Oxer jon@oxer.com.au / http://www.practicalarduino.com 6 | Copyright 2008 Maurice Ribble ribblem@yahoo.com / http://www.glacialwanderer.com 7 | 8 | It now provides a simple interface to the SHT10 sensor made to function with the Arduino Fio (3.3V) 9 | 10 | Installation 11 | ------------ 12 | Put this directory in your sketchbook and open the ino file. 13 | 14 | Usage 15 | ----- 16 | The library is instantiated as an object with methods provided to read 17 | relative humidity and temperature. Include it in your sketch and then 18 | create an object, specifying the pins to use for communication with the 19 | sensor: 20 | 21 | #include "SHT1x.h" 22 | #define dataPin 10 23 | #define clockPin 11 24 | SHT1x sht10(dataPin, clockPin); 25 | 26 | You can then call methods on that object within your program. In this 27 | example we created an object called "sht10", but it could have been 28 | called whatever you like. 29 | 30 | ### readTemperatureC() ### 31 | 32 | Returns a float within the valid range of the sensor of -40 to +123.8C. 33 | A value of -273 is returned in the event of a communication error with 34 | the sensor. 35 | 36 | Example: 37 | 38 | float tempC = sht10.readTemperatureC(); 39 | 40 | ### retrieveTemperatureC() ### 41 | 42 | Returns a float of the temperature in celcius that was measured during the humidity measurement. This prevents needing two calls to the temperature sensor. Call the humidty function readHumidity() then retrieveTemperatureC(). 43 | 44 | ### readHumidity() ### 45 | 46 | Returns a float within the valid range of the sensor of 0 to 100%. 47 | A negative value is returned in the event of a communication error with 48 | the sensor. 49 | 50 | Example: 51 | 52 | float humidity = sht1x.readHumidity(); 53 | -------------------------------------------------------------------------------- /ModuleHumTempSensor/SHT1x.h: -------------------------------------------------------------------------------- 1 | /** 2 | * SHT1x Library 3 | * 4 | * Modified by Cyrille Medard de Chardon, Christophe Terfois for 3V3 Arduino Fio 5 | * 6 | * Copyright 2009 Jonathan Oxer / 7 | * Based on previous work by: 8 | * Maurice Ribble: 9 | * Wayne ?: 10 | * 11 | * Manages communication with SHT1x series (SHT10, SHT11, SHT15) 12 | * temperature / humidity sensors from Sensirion (www.sensirion.com). 13 | */ 14 | #ifndef SHT1x_h 15 | #define SHT1x_h 16 | 17 | #if (ARDUINO >= 100) 18 | #include 19 | #else 20 | #include 21 | #endif 22 | 23 | class SHT1x 24 | { 25 | public: 26 | SHT1x(int dataPin, int clockPin); 27 | float readHumidity(); 28 | float readTemperatureC(); 29 | float retrieveTemperatureC(); 30 | private: 31 | int _dataPin; 32 | int _clockPin; 33 | float _temperatureC; 34 | float readTemperatureRaw(); 35 | int shiftIn(int _dataPin, int _clockPin, int _numBits); 36 | void sendCommandSHT(int _command, int _dataPin, int _clockPin); 37 | void waitForResultSHT(int _dataPin); 38 | int getData16SHT(int _dataPin, int _clockPin); 39 | }; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Module_COSensor/CO_Sensor/COS_MQ7.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | CO Sensor library 3 | COS_MQ7.h - Library for reading the MQ-7 Carbon Monoxide Sensor 4 | Created by J Saavedra, October 2010. 5 | http://jos.ph 6 | Modified by Cyrille Medard de Chardon, Christophe Trefois 2014. 7 | */ 8 | 9 | #include "COS_MQ7.h" 10 | 11 | // Constructor 12 | COS_MQ7::COS_MQ7(int LED_Indicator_Pin, int PWM_Tog_Pin, int CO_Reading_Pin, int V_Reading_Pin, int init_purge_sec){ 13 | 14 | pinMode(LED_Indicator_Pin, OUTPUT); 15 | pinMode(PWM_Tog_Pin, OUTPUT); 16 | pinMode(CO_Reading_Pin, INPUT); 17 | pinMode(V_Reading_Pin, INPUT); 18 | 19 | _LED_Indicator_Pin = LED_Indicator_Pin; 20 | _PWM_Tog_Pin = PWM_Tog_Pin; 21 | _CO_Reading_Pin = CO_Reading_Pin; 22 | _V_Reading_Pin = V_Reading_Pin; 23 | 24 | // set the duration of the initial purge 25 | if (init_purge_sec < 0) { 26 | _init_purge_sec = 500; 27 | } else { 28 | _init_purge_sec = init_purge_sec; 29 | } 30 | 31 | State = 0; 32 | Current_time = millis(); 33 | Last_time = Current_time; 34 | State_duration = 5; // Wait 5 seconds before starting 35 | Reading = -1; 36 | Voltage = -1; 37 | current_reading = -1; 38 | } 39 | 40 | void COS_MQ7::Power_cycle(){ 41 | 42 | Current_time = millis(); 43 | 44 | // get current reading from CO and voltage 45 | current_reading = analogRead(_CO_Reading_Pin); 46 | Voltage = analogRead(_V_Reading_Pin); 47 | 48 | // see if enough time has passed to change state 49 | if ( (Current_time - Last_time) > (State_duration * 1000) ){ 50 | Last_time = Current_time; 51 | State_duration = 0; 52 | 53 | // complete one of the following based on State 54 | switch(State) { 55 | 56 | // initialization purge - only runs on boot/launch 57 | case 0: 58 | State = 1; 59 | State_duration = 500; // 500 seconds at 5v to do initial purge 60 | digitalWrite(_LED_Indicator_Pin, HIGH); 61 | digitalWrite(_PWM_Tog_Pin, HIGH); 62 | break; 63 | 64 | // start heating 65 | case 1: 66 | State = 2; 67 | State_duration = 60; // 60 seconds at 5v 68 | digitalWrite(_LED_Indicator_Pin, HIGH); 69 | digitalWrite(_PWM_Tog_Pin, HIGH); 70 | break; 71 | 72 | // start cooling 73 | case 2: 74 | State = 3; 75 | State_duration = 90; //90 seconds at 1.4v 76 | digitalWrite(_LED_Indicator_Pin, LOW); 77 | analogWrite(_PWM_Tog_Pin, 71); // need to use analogWrite to digital PWM pin 78 | break; 79 | 80 | // cooling is finished, read 'correct' reading 81 | case 3: 82 | State = 4; 83 | Reading = current_reading; 84 | break; 85 | 86 | case 4: 87 | // indefinite state until the value is read 88 | break; 89 | } 90 | } 91 | } 92 | 93 | int COS_MQ7::Get_CO_reading(){ 94 | // will begin heating again after next Power_cycle() call 95 | int tmpRet; 96 | State = 1; 97 | tmpRet = Reading; 98 | Reading = -1; 99 | return tmpRet; 100 | } 101 | 102 | int COS_MQ7::Get_current_CO_reading(){ 103 | return current_reading; 104 | } 105 | 106 | int COS_MQ7::Get_Voltage_reading(){ 107 | return Voltage; 108 | } 109 | 110 | int COS_MQ7::Get_state(){ 111 | return State; 112 | } 113 | -------------------------------------------------------------------------------- /Module_COSensor/CO_Sensor/COS_MQ7.h: -------------------------------------------------------------------------------- 1 | /* 2 | COS_MQ7.h - Library for reading the MQ-7 Carbon Monoxide Sensor 3 | Released into the public domain. 4 | Created by J Saavedra, October 2010. 5 | http://jos.ph 6 | Modified by Cyrille Medard de Chardon, Christophe Trefois 2014. 7 | */ 8 | 9 | 10 | #ifndef COS_MQ7_h 11 | #define COS_MQ7_h 12 | 13 | #if ARDUINO >= 100 14 | #include "Arduino.h" 15 | #else 16 | #include "WProgram.h" 17 | #endif 18 | 19 | class COS_MQ7{ 20 | 21 | public: 22 | COS_MQ7(int LED_Indicator_Pin, int PWM_Tog_Pin, int CO_Reading_Pin, int V_Reading_Pin, int init_purge_sec); 23 | void Power_cycle(); 24 | int Get_state(); 25 | int Get_CO_reading(); 26 | int Get_current_CO_reading(); 27 | int Get_Voltage_reading(); 28 | 29 | private: 30 | unsigned long Current_time; 31 | unsigned long Last_time; 32 | unsigned long State_duration; 33 | 34 | int _LED_Indicator_Pin; 35 | int _PWM_Tog_Pin; 36 | int _CO_Reading_Pin; 37 | int _V_Reading_Pin; 38 | int _init_purge_sec; 39 | 40 | int State; 41 | int Reading; 42 | int current_reading; 43 | int Voltage; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Module_COSensor/CO_Sensor/CO_Sensor.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Module using an Arduino Fio and a MQ-7 on Parallax Gas Sensor Module. 3 | A seperate power source is used as the Fio cannot source enough current 4 | for the MQ-7 module. 5 | 6 | Blog: http://arduinodev.woofex.net/ 7 | Code: https://github.com/Trefex/arduino-airquality/ 8 | 9 | For Pin connections, please check the Blog or the github project page 10 | Authors: Cyrille Médard de Chardon (serialC), Christophe Trefois (Trefex) 11 | Changelog: 12 | 2013-Dec-22: First correctly working version with codebase 13 | 2014-Jan-04: Updated existing library to facilitate usage 14 | 15 | This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 16 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter 17 | to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 18 | */ 19 | 20 | #include "COS_MQ7.h" 21 | 22 | // Pin definitions 23 | #define ACTIVE_MONOX_LED_PIN 13 24 | #define ACTIVE_MONOX_PIN 11 25 | #define READ_MONOX_PIN A7 26 | #define READ_COPSV_PIN A1 27 | 28 | // Variable initializations 29 | int reading, voltage; 30 | 31 | // create CO sensor object 32 | // Last parameter is the duration of initial purge in seconds, negative value sets to default 500 seconds 33 | COS_MQ7 MQ7(ACTIVE_MONOX_LED_PIN, ACTIVE_MONOX_PIN, READ_MONOX_PIN, READ_COPSV_PIN, -1); 34 | 35 | void setup() { 36 | Serial.begin(9600); 37 | } 38 | 39 | void loop() { 40 | MQ7.Power_cycle(); 41 | 42 | // for testing 43 | Serial.print(MQ7.Get_state()); 44 | Serial.print(','); 45 | Serial.print(MQ7.Get_Voltage_reading()); 46 | Serial.print(','); 47 | Serial.println(MQ7.Get_current_CO_reading()); 48 | 49 | // Only record 'good' reading 50 | if(MQ7.Get_state() == 4) { 51 | voltage = MQ7.Get_CO_reading(); 52 | } 53 | 54 | // Do something when CO psu voltage is too low 55 | 56 | if(MQ7.Get_Voltage_reading() < 400) { 57 | Serial.println("CO sensor power supply voltage is too low."); 58 | // do something 59 | } 60 | 61 | delay(1000); 62 | } 63 | -------------------------------------------------------------------------------- /Module_COSensor/notes.txt: -------------------------------------------------------------------------------- 1 | Note regarding Gas Sensor Module (GSM) 2 | - only interested in TP1 which varies from 0V - 5V 3 | - not interested in other TP (TP2/4 GRND, TP3 Alarm trip level) 4 | - don't need to calibrate trip level screw on left, other than set it very high so it actually is a coherent visual warning.. 5 | - adding a 1k resistor between TP1 and Fio 6 | - soldered wire to TP1 7 | 8 | CO sensor: 9 | When heating should pull about 165 mA, 60mA when 'off' 10 | Needs a 5V signal to heat switch (HSW) to turn it on 11 | Needs a 1.4V signal to HSW to let the sensor 'cool' 12 | -------------------------------------------------------------------------------- /Module_COSensor/outputs/First_70m_cooking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_COSensor/outputs/First_70m_cooking.png -------------------------------------------------------------------------------- /Module_COSensor/outputs/Rplot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_COSensor/outputs/Rplot.png -------------------------------------------------------------------------------- /Module_COSensor/outputs/Rplot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_COSensor/outputs/Rplot01.png -------------------------------------------------------------------------------- /Module_COSensor/outputs/analysis.R: -------------------------------------------------------------------------------- 1 | setwd('sketchbook/arduino-airquality/Module_COSensor/outputs/') 2 | plot_co_data('output.txt') 3 | plot_co_data('output2.txt') 4 | plot_co_data('output3.txt') 5 | plot_co_data('output4.txt') 6 | plot_co_data('output5.txt') 7 | data <- plot_co_data('output6.txt') 8 | 9 | plot_co_data('li-ion_output.txt') 10 | plot_co_data('butane_exposure.txt') 11 | 12 | burn <- plot_co_data('burning.txt') 13 | plot(burn$value, type='l') 14 | 15 | plot_co_data <- function(fn) { 16 | dict <- list(C = 'Cooling', H = 'Heating', I='Initialization', R='Reading') 17 | 18 | fd <- read.csv(fn, header=FALSE) 19 | names(fd) <- c('type', 'value') 20 | plot(fd$value, col=fd$type, cex=0.7) 21 | legend('topleft', legend=dict[names(table(fd$type))], col=c(1:4), pch=1, cex=0.7) 22 | return(fd) 23 | } 24 | 25 | libdata <- read.table('output7.txt',sep=',') 26 | names(libdata) <- c('mode', 'voltage','CO') 27 | plot(libdata[libdata$mode == 4,]$CO) 28 | plot(libdata$CO, cex=0.5) 29 | 30 | burning <- read.table('burning.txt', sep=',') 31 | 32 | plot(burning$V2, type='l', xlab='Time (seconds)', ylab='Reading (resistance Ω)', main='Readings from first 70 minutes of cooking sensor') 33 | 34 | post_burning <- read.table('post_burn_output.txt', sep=',') 35 | plot(post_burning$V3, col=post_burning$V1, cex=0.3) 36 | plot(post_burning[post_burning$V1 == 4,3], xlab='Time (interval of 150 seconds)', ylab='CO resistance reading') 37 | -------------------------------------------------------------------------------- /Module_COSensor/outputs/unstable_readings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_COSensor/outputs/unstable_readings.png -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_BMP085/Adafruit_BMP085.h: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | This is a library for the BMP085 Barometric Pressure & Temp Sensor 3 | 4 | Designed specifically to work with the Adafruit BMP085 Breakout 5 | ----> https://www.adafruit.com/products/391 6 | 7 | These displays use I2C to communicate, 2 pins are required to 8 | interface 9 | Adafruit invests time and resources providing this open source code, 10 | please support Adafruit and open-source hardware by purchasing 11 | products from Adafruit! 12 | 13 | Written by Limor Fried/Ladyada for Adafruit Industries. 14 | BSD license, all text above must be included in any redistribution 15 | ****************************************************/ 16 | 17 | #if (ARDUINO >= 100) 18 | #include "Arduino.h" 19 | #else 20 | #include "WProgram.h" 21 | #endif 22 | #include "Wire.h" 23 | 24 | #define BMP085_DEBUG 0 25 | 26 | #define BMP085_I2CADDR 0x77 27 | 28 | #define BMP085_ULTRALOWPOWER 0 29 | #define BMP085_STANDARD 1 30 | #define BMP085_HIGHRES 2 31 | #define BMP085_ULTRAHIGHRES 3 32 | #define BMP085_CAL_AC1 0xAA // R Calibration data (16 bits) 33 | #define BMP085_CAL_AC2 0xAC // R Calibration data (16 bits) 34 | #define BMP085_CAL_AC3 0xAE // R Calibration data (16 bits) 35 | #define BMP085_CAL_AC4 0xB0 // R Calibration data (16 bits) 36 | #define BMP085_CAL_AC5 0xB2 // R Calibration data (16 bits) 37 | #define BMP085_CAL_AC6 0xB4 // R Calibration data (16 bits) 38 | #define BMP085_CAL_B1 0xB6 // R Calibration data (16 bits) 39 | #define BMP085_CAL_B2 0xB8 // R Calibration data (16 bits) 40 | #define BMP085_CAL_MB 0xBA // R Calibration data (16 bits) 41 | #define BMP085_CAL_MC 0xBC // R Calibration data (16 bits) 42 | #define BMP085_CAL_MD 0xBE // R Calibration data (16 bits) 43 | 44 | #define BMP085_CONTROL 0xF4 45 | #define BMP085_TEMPDATA 0xF6 46 | #define BMP085_PRESSUREDATA 0xF6 47 | #define BMP085_READTEMPCMD 0x2E 48 | #define BMP085_READPRESSURECMD 0x34 49 | 50 | 51 | class Adafruit_BMP085 { 52 | public: 53 | Adafruit_BMP085(); 54 | boolean begin(uint8_t mode = BMP085_ULTRAHIGHRES); // by default go highres 55 | float readTemperature(void); 56 | int32_t readPressure(void); 57 | float readAltitude(float sealevelPressure = 101325); // std atmosphere 58 | uint16_t readRawTemperature(void); 59 | uint32_t readRawPressure(void); 60 | 61 | private: 62 | uint8_t read8(uint8_t addr); 63 | uint16_t read16(uint8_t addr); 64 | void write8(uint8_t addr, uint8_t data); 65 | 66 | uint8_t oversampling; 67 | 68 | int16_t ac1, ac2, ac3, b1, b2, mb, mc, md; 69 | uint16_t ac4, ac5, ac6; 70 | }; 71 | 72 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_BMP085/README.txt: -------------------------------------------------------------------------------- 1 | This is a library for the Adafruit BMP085 Barometric Pressure + Temp sensor 2 | 3 | Designed specifically to work with the Adafruit BMP085 Breakout 4 | ----> https://www.adafruit.com/products/391 5 | 6 | These displays use I2C to communicate, 2 pins are required to interface 7 | Adafruit invests time and resources providing this open source code, 8 | please support Adafruit and open-source hardware by purchasing 9 | products from Adafruit! 10 | 11 | Check out the links above for our tutorials and wiring diagrams 12 | 13 | Adafruit invests time and resources providing this open source code, 14 | please support Adafruit and open-source hardware by purchasing 15 | products from Adafruit! 16 | 17 | Written by Limor Fried/Ladyada for Adafruit Industries. 18 | BSD license, all text above must be included in any redistribution 19 | 20 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_BMP085. Check that the Adafruit_BMP085 folder contains Adafruit_BMP085.cpp and Adafruit_BMP085.h 21 | 22 | Place the Adafruit_BMP085 library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_BMP085/examples/BMP085test/BMP085test.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /*************************************************** 5 | This is an example for the BMP085 Barometric Pressure & Temp Sensor 6 | 7 | Designed specifically to work with the Adafruit BMP085 Breakout 8 | ----> https://www.adafruit.com/products/391 9 | 10 | These displays use I2C to communicate, 2 pins are required to 11 | interface 12 | Adafruit invests time and resources providing this open source code, 13 | please support Adafruit and open-source hardware by purchasing 14 | products from Adafruit! 15 | 16 | Written by Limor Fried/Ladyada for Adafruit Industries. 17 | BSD license, all text above must be included in any redistribution 18 | ****************************************************/ 19 | 20 | // Connect VCC of the BMP085 sensor to 3.3V (NOT 5.0V!) 21 | // Connect GND to Ground 22 | // Connect SCL to i2c clock - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 5 23 | // Connect SDA to i2c data - on '168/'328 Arduino Uno/Duemilanove/etc thats Analog 4 24 | // EOC is not used, it signifies an end of conversion 25 | // XCLR is a reset pin, also not used here 26 | 27 | Adafruit_BMP085 bmp; 28 | 29 | void setup() { 30 | Serial.begin(9600); 31 | if (!bmp.begin()) { 32 | Serial.println("Could not find a valid BMP085 sensor, check wiring!"); 33 | while (1) {} 34 | } 35 | } 36 | 37 | void loop() { 38 | Serial.print("Temperature = "); 39 | Serial.print(bmp.readTemperature()); 40 | Serial.println(" *C"); 41 | 42 | Serial.print("Pressure = "); 43 | Serial.print(bmp.readPressure()); 44 | Serial.println(" Pa"); 45 | 46 | // Calculate altitude assuming 'standard' barometric 47 | // pressure of 1013.25 millibar = 101325 Pascal 48 | Serial.print("Altitude = "); 49 | Serial.print(bmp.readAltitude()); 50 | Serial.println(" meters"); 51 | 52 | // you can get a more precise measurement of altitude 53 | // if you know the current sea level pressure which will 54 | // vary with weather and such. If it is 1015 millibars 55 | // that is equal to 101500 Pascals. 56 | Serial.print("Real altitude = "); 57 | Serial.print(bmp.readAltitude(101500)); 58 | Serial.println(" meters"); 59 | 60 | Serial.println(); 61 | delay(500); 62 | } -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/README.txt: -------------------------------------------------------------------------------- 1 | This is the Adafruit GPS library - the ultimate GPS library 2 | for the ultimate GPS module! 3 | 4 | Tested and works great with the Adafruit Ultimate GPS module 5 | using MTK33x9 chipset 6 | ------> http://www.adafruit.com/products/746 7 | 8 | These modules use TTL serial to communicate, 2 pins are required to 9 | interface 10 | 11 | Adafruit invests time and resources providing this open source code, 12 | please support Adafruit and open-source hardware by purchasing 13 | products from Adafruit! 14 | 15 | Written by Limor Fried/Ladyada for Adafruit Industries. 16 | BSD license, check license.txt for more information 17 | All text above must be included in any redistribution 18 | 19 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_GPS. Check that the Adafruit_GPS folder contains Adafruit_GPS.cpp and Adafruit_GPS.h 20 | 21 | Place the Adafruit_GPS library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/blank/blank.pde: -------------------------------------------------------------------------------- 1 | // this sketch will allow you to bypass the Atmega chip 2 | // and connect the GPS sensor directly to the USB/Serial 3 | // chip converter. 4 | 5 | // Connect VIN to +5V 6 | // Connect GND to Ground 7 | // Connect GPS RX (data into GPS) to Digital 0 8 | // Connect GPS TX (data out from GPS) to Digital 1 9 | 10 | void setup() {} 11 | void loop() {} 12 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/flora_dumplog/flora_gpsdump.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | Adafruit_GPS GPS(&Serial1); 4 | 5 | // Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console 6 | // Set to 'true' if you want to debug and listen to the raw GPS sentences 7 | #define GPSECHO true 8 | 9 | // this keeps track of whether we're using the interrupt 10 | // off by default! 11 | boolean usingInterrupt = false; 12 | 13 | void setup() 14 | { 15 | while (!Serial); 16 | // connect at 115200 so we can read the GPS fast enuf and 17 | // also spit it out 18 | Serial.begin(115200); 19 | Serial.println("Adafruit GPS logging dump test!"); 20 | 21 | // 9600 NMEA is the default baud rate for MTK - some use 4800 22 | GPS.begin(9600); 23 | 24 | GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_OFF); 25 | 26 | while (Serial1.available()) 27 | Serial1.read(); 28 | 29 | delay(1000); 30 | GPS.sendCommand("$PMTK622,1*29"); 31 | Serial.println("----------------------------------------------------"); 32 | } 33 | 34 | 35 | void loop() // run over and over again 36 | { 37 | if (Serial1.available()) { 38 | char c = Serial1.read(); 39 | if (c) Serial.print(c); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/flora_gpslog/flora_gpslog.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | Adafruit_GPS GPS(&Serial1); 4 | 5 | // Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console 6 | // Set to 'true' if you want to debug and listen to the raw GPS sentences 7 | #define GPSECHO true 8 | 9 | // this keeps track of whether we're using the interrupt 10 | // off by default! 11 | boolean usingInterrupt = false; 12 | 13 | void setup() 14 | { 15 | //while (!Serial); 16 | // connect at 115200 so we can read the GPS fast enuf and 17 | // also spit it out 18 | Serial.begin(115200); 19 | Serial.println("Adafruit GPS logging start test!"); 20 | 21 | // 9600 NMEA is the default baud rate for MTK - some use 4800 22 | GPS.begin(9600); 23 | 24 | // You can adjust which sentences to have the module emit, below 25 | // Default is RMC + GGA 26 | GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); 27 | // Default is 1 Hz update rate 28 | GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); 29 | 30 | // the nice thing about this code is you can have a timer0 interrupt go off 31 | // every 1 millisecond, and read data from the GPS for you. that makes the 32 | // loop code a heck of a lot easier! 33 | useInterrupt(true); 34 | 35 | delay(500); 36 | while (true) { 37 | Serial.print("Starting logging...."); 38 | if (GPS.LOCUS_StartLogger()) { 39 | Serial.println(" STARTED!"); 40 | break; 41 | } else { 42 | Serial.println(" no response :("); 43 | } 44 | } 45 | } 46 | 47 | 48 | 49 | void loop() // run over and over again 50 | { 51 | pinMode(7, OUTPUT); 52 | digitalWrite(7, HIGH); 53 | delay(200); 54 | digitalWrite(7, LOW); 55 | delay(200); 56 | } 57 | 58 | /******************************************************************/ 59 | // Interrupt is called once a millisecond, looks for any new GPS data, and stores it 60 | SIGNAL(TIMER0_COMPA_vect) { 61 | char c = GPS.read(); 62 | // if you want to debug, this is a good time to do it! 63 | if (GPSECHO) 64 | if (c) Serial.print(c); 65 | } 66 | 67 | void useInterrupt(boolean v) { 68 | if (v) { 69 | // Timer0 is already used for millis() - we'll just interrupt somewhere 70 | // in the middle and call the "Compare A" function above 71 | OCR0A = 0xAF; 72 | TIMSK0 |= _BV(OCIE0A); 73 | usingInterrupt = true; 74 | } else { 75 | // do not call the interrupt function COMPA anymore 76 | TIMSK0 &= ~_BV(OCIE0A); 77 | usingInterrupt = false; 78 | } 79 | } 80 | 81 | 82 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/flora_gpstest/flora_gpstest.ino: -------------------------------------------------------------------------------- 1 | // test a passthru between USB and hardware serial 2 | 3 | void setup() { 4 | while (!Serial); 5 | Serial.begin(9600); 6 | Serial1.begin(9600); 7 | } 8 | 9 | 10 | void loop() { 11 | if (Serial.available()) { 12 | char c = Serial.read(); 13 | Serial1.write(c); 14 | } 15 | if (Serial1.available()) { 16 | char c = Serial1.read(); 17 | Serial.write(c); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/locus_dumpbasic/locus_dumpbasic.pde: -------------------------------------------------------------------------------- 1 | // Test code for Adafruit GPS modules using MTK3329/MTK3339 driver 2 | // 3 | // This code turns on the LOCUS built-in datalogger. The datalogger 4 | // turns off when power is lost, so you MUST turn it on every time 5 | // you want to use it! 6 | // 7 | // Tested and works great with the Adafruit Ultimate GPS module 8 | // using MTK33x9 chipset 9 | // ------> http://www.adafruit.com/products/746 10 | // Pick one up today at the Adafruit electronics shop 11 | // and help support open source hardware & software! -ada 12 | 13 | #include 14 | #if ARDUINO >= 100 15 | #include 16 | #else 17 | // Older Arduino IDE requires NewSoftSerial, download from: 18 | // http://arduiniana.org/libraries/newsoftserial/ 19 | // #include 20 | // DO NOT install NewSoftSerial if using Arduino 1.0 or later! 21 | #endif 22 | 23 | // Connect the GPS Power pin to 5V 24 | // Connect the GPS Ground pin to ground 25 | // If using software serial (sketch example default): 26 | // Connect the GPS TX (transmit) pin to Digital 3 27 | // Connect the GPS RX (receive) pin to Digital 2 28 | // If using hardware serial (e.g. Arduino Mega): 29 | // Connect the GPS TX (transmit) pin to Arduino RX1, RX2 or RX3 30 | // Connect the GPS RX (receive) pin to matching TX1, TX2 or TX3 31 | 32 | // If using software serial, keep these lines enabled 33 | // (you can change the pin numbers to match your wiring): 34 | #if ARDUINO >= 100 35 | SoftwareSerial mySerial(3, 2); 36 | #else 37 | NewSoftSerial mySerial(3, 2); 38 | #endif 39 | Adafruit_GPS GPS(&mySerial); 40 | // If using hardware serial (e.g. Arduino Mega), comment 41 | // out the above six lines and enable this line instead: 42 | //Adafruit_GPS GPS(&Serial1); 43 | 44 | void setup() 45 | { 46 | // connect at 115200 so we can read the GPS fast enuf and 47 | // also spit it out 48 | Serial.begin(115200); 49 | Serial.println("Adafruit GPS logging start test!"); 50 | 51 | // 9600 NMEA is the default baud rate for MTK - some use 4800 52 | GPS.begin(9600); 53 | 54 | GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_OFF); 55 | 56 | // If using hardware serial (e.g. Arduino Mega), change this to Serial1, etc. 57 | while (mySerial.available()) 58 | mySerial.read(); 59 | 60 | delay(1000); 61 | GPS.sendCommand("$PMTK622,1*29"); 62 | Serial.println("----------------------------------------------------"); 63 | } 64 | 65 | 66 | void loop() // run over and over again 67 | { 68 | // If using hardware serial (e.g. Arduino Mega), change this to Serial1, etc. 69 | if (mySerial.available()) { 70 | char c = mySerial.read(); 71 | if (c) UDR0 = c; 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/locus_erase/locus_erase.pde: -------------------------------------------------------------------------------- 1 | // Test code for Adafruit GPS modules using MTK3329/MTK3339 driver 2 | // 3 | // This code erases the LOCUS built-in datalogger storage 4 | // 5 | // Tested and works great with the Adafruit Ultimate GPS module 6 | // using MTK33x9 chipset 7 | // ------> http://www.adafruit.com/products/746 8 | // Pick one up today at the Adafruit electronics shop 9 | // and help support open source hardware & software! -ada 10 | 11 | #include 12 | #if ARDUINO >= 100 13 | #include 14 | #else 15 | // Older Arduino IDE requires NewSoftSerial, download from: 16 | // http://arduiniana.org/libraries/newsoftserial/ 17 | // #include 18 | // DO NOT install NewSoftSerial if using Arduino 1.0 or later! 19 | #endif 20 | 21 | // Connect the GPS Power pin to 5V 22 | // Connect the GPS Ground pin to ground 23 | // If using software serial (sketch example default): 24 | // Connect the GPS TX (transmit) pin to Digital 3 25 | // Connect the GPS RX (receive) pin to Digital 2 26 | // If using hardware serial (e.g. Arduino Mega): 27 | // Connect the GPS TX (transmit) pin to Arduino RX1, RX2 or RX3 28 | // Connect the GPS RX (receive) pin to matching TX1, TX2 or TX3 29 | 30 | // If using software serial, keep these lines enabled 31 | // (you can change the pin numbers to match your wiring): 32 | #if ARDUINO >= 100 33 | SoftwareSerial mySerial(3, 2); 34 | #else 35 | NewSoftSerial mySerial(3, 2); 36 | #endif 37 | Adafruit_GPS GPS(&mySerial); 38 | // If using hardware serial (e.g. Arduino Mega), comment 39 | // out the above six lines and enable this line instead: 40 | //Adafruit_GPS GPS(&Serial1); 41 | 42 | 43 | // Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console 44 | // Set to 'true' if you want to debug and listen to the raw GPS sentences 45 | #define GPSECHO false 46 | 47 | // this keeps track of whether we're using the interrupt 48 | // off by default! 49 | boolean usingInterrupt = false; 50 | void useInterrupt(boolean); // Func prototype keeps Arduino 0023 happy 51 | 52 | void setup() 53 | { 54 | // connect at 115200 so we can read the GPS fast enuf and 55 | // also spit it out 56 | Serial.begin(115200); 57 | Serial.println("Adafruit GPS erase FLASH!"); 58 | 59 | // 9600 NMEA is the default baud rate for MTK 60 | GPS.begin(9600); 61 | 62 | GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_OFF); 63 | 64 | // the nice thing about this code is you can have a timer0 interrupt go off 65 | // every 1 millisecond, and read data from the GPS for you. that makes the 66 | // loop code a heck of a lot easier! 67 | useInterrupt(true); 68 | 69 | Serial.println("This code will ERASE the data log stored in the FLASH - Permanently!"); 70 | Serial.print("Are you sure you want to do this? [Y/N]: "); 71 | while (Serial.read() != 'Y') delay(10); 72 | Serial.println("\nERASING! UNPLUG YOUR ARDUINO WITHIN 5 SECONDS IF YOU DIDNT MEAN TO!"); 73 | delay(5000); 74 | GPS.sendCommand(PMTK_LOCUS_ERASE_FLASH); 75 | Serial.println("Erased"); 76 | } 77 | 78 | 79 | 80 | void loop() // run over and over again 81 | { 82 | // If using hardware serial (e.g. Arduino Mega), change this to Serial1, etc. 83 | if (mySerial.available()) { 84 | char c = mySerial.read(); 85 | if (c) UDR0 = c; 86 | } 87 | } 88 | 89 | /******************************************************************/ 90 | // Interrupt is called once a millisecond, looks for any new GPS data, and stores it 91 | SIGNAL(TIMER0_COMPA_vect) { 92 | char c = GPS.read(); 93 | // if you want to debug, this is a good time to do it! 94 | if (GPSECHO) 95 | if (c) UDR0 = c; 96 | // writing direct to UDR0 is much much faster than Serial.print 97 | // but only one character can be written at a time. 98 | 99 | } 100 | 101 | void useInterrupt(boolean v) { 102 | if (v) { 103 | // Timer0 is already used for millis() - we'll just interrupt somewhere 104 | // in the middle and call the "Compare A" function above 105 | OCR0A = 0xAF; 106 | TIMSK0 |= _BV(OCIE0A); 107 | usingInterrupt = true; 108 | } else { 109 | // do not call the interrupt function COMPA anymore 110 | TIMSK0 &= ~_BV(OCIE0A); 111 | usingInterrupt = false; 112 | } 113 | } 114 | 115 | 116 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/examples/locus_start/locus_start.pde: -------------------------------------------------------------------------------- 1 | // Test code for Adafruit GPS modules using MTK3329/MTK3339 driver 2 | // 3 | // This code turns on the LOCUS built-in datalogger. The datalogger 4 | // turns off when power is lost, so you MUST turn it on every time 5 | // you want to use it! 6 | // 7 | // Tested and works great with the Adafruit Ultimate GPS module 8 | // using MTK33x9 chipset 9 | // ------> http://www.adafruit.com/products/746 10 | // Pick one up today at the Adafruit electronics shop 11 | // and help support open source hardware & software! -ada 12 | 13 | #include 14 | #if ARDUINO >= 100 15 | #include 16 | #else 17 | // Older Arduino IDE requires NewSoftSerial, download from: 18 | // http://arduiniana.org/libraries/newsoftserial/ 19 | // #include 20 | // DO NOT install NewSoftSerial if using Arduino 1.0 or later! 21 | #endif 22 | 23 | // Connect the GPS Power pin to 5V 24 | // Connect the GPS Ground pin to ground 25 | // If using software serial (sketch example default): 26 | // Connect the GPS TX (transmit) pin to Digital 3 27 | // Connect the GPS RX (receive) pin to Digital 2 28 | // If using hardware serial (e.g. Arduino Mega): 29 | // Connect the GPS TX (transmit) pin to Arduino RX1, RX2 or RX3 30 | // Connect the GPS RX (receive) pin to matching TX1, TX2 or TX3 31 | 32 | // If using software serial, keep these lines enabled 33 | // (you can change the pin numbers to match your wiring): 34 | #if ARDUINO >= 100 35 | SoftwareSerial mySerial(3, 2); 36 | #else 37 | NewSoftSerial mySerial(3, 2); 38 | #endif 39 | Adafruit_GPS GPS(&mySerial); 40 | // If using hardware serial (e.g. Arduino Mega), comment 41 | // out the above six lines and enable this line instead: 42 | //Adafruit_GPS GPS(&Serial1); 43 | 44 | 45 | // Set GPSECHO to 'false' to turn off echoing the GPS data to the Serial console 46 | // Set to 'true' if you want to debug and listen to the raw GPS sentences 47 | #define GPSECHO true 48 | 49 | // this keeps track of whether we're using the interrupt 50 | // off by default! 51 | boolean usingInterrupt = false; 52 | void useInterrupt(boolean); // Func prototype keeps Arduino 0023 happy 53 | 54 | void setup() 55 | { 56 | // connect at 115200 so we can read the GPS fast enuf and 57 | // also spit it out 58 | Serial.begin(115200); 59 | Serial.println("Adafruit GPS logging start test!"); 60 | 61 | // 9600 NMEA is the default baud rate for MTK - some use 4800 62 | GPS.begin(9600); 63 | 64 | // You can adjust which sentences to have the module emit, below 65 | // Default is RMC + GGA 66 | GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); 67 | // Default is 1 Hz update rate 68 | GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); 69 | 70 | // the nice thing about this code is you can have a timer0 interrupt go off 71 | // every 1 millisecond, and read data from the GPS for you. that makes the 72 | // loop code a heck of a lot easier! 73 | useInterrupt(true); 74 | delay(500); 75 | Serial.print("\nSTARTING LOGGING...."); 76 | if (GPS.LOCUS_StartLogger()) 77 | Serial.println(" STARTED!"); 78 | else 79 | Serial.println(" no response :("); 80 | delay(1000); 81 | } 82 | 83 | 84 | 85 | void loop() // run over and over again 86 | { 87 | // do nothing! all reading and printing is done in the interrupt 88 | } 89 | 90 | /******************************************************************/ 91 | // Interrupt is called once a millisecond, looks for any new GPS data, and stores it 92 | SIGNAL(TIMER0_COMPA_vect) { 93 | char c = GPS.read(); 94 | // if you want to debug, this is a good time to do it! 95 | if (GPSECHO) 96 | if (c) UDR0 = c; 97 | // writing direct to UDR0 is much much faster than Serial.print 98 | // but only one character can be written at a time. 99 | } 100 | 101 | void useInterrupt(boolean v) { 102 | if (v) { 103 | // Timer0 is already used for millis() - we'll just interrupt somewhere 104 | // in the middle and call the "Compare A" function above 105 | OCR0A = 0xAF; 106 | TIMSK0 |= _BV(OCIE0A); 107 | usingInterrupt = true; 108 | } else { 109 | // do not call the interrupt function COMPA anymore 110 | TIMSK0 &= ~_BV(OCIE0A); 111 | usingInterrupt = false; 112 | } 113 | } 114 | 115 | 116 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog-Baro/Adafruit_GPS/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012, Adafruit Industries 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holders nor the 14 | names of its contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog/README.md: -------------------------------------------------------------------------------- 1 | arduino-airquality - Combine Dust Sensor - GPS - OpenLog 2 | ================== 3 | 4 | In this project, we are building a combination module of the Sharp Dust Sensor, the Adafruit Ultimate GPS Breakout v3 and the OpenLog using the Arduino Fio. 5 | 6 | For a detailled documentation including a parts list, check out the following blog post 7 | http://arduinodev.woofex.net/2012/12/16/sharp-dust-sensor-with-adafruit-gps-v3 8 | 9 | # Assembly 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog/assembly/ArduinoFio_OpenLog_GPS_Sharp.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-GPS-OpenLog/assembly/ArduinoFio_OpenLog_GPS_Sharp.fzz -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog/assembly/_Blog Images/gps_sd_zoom.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-GPS-OpenLog/assembly/_Blog Images/gps_sd_zoom.JPG -------------------------------------------------------------------------------- /Module_Dust-GPS-OpenLog/assembly/_Blog Images/overall_setup.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-GPS-OpenLog/assembly/_Blog Images/overall_setup.JPG -------------------------------------------------------------------------------- /Module_Dust-Sensor/README.md: -------------------------------------------------------------------------------- 1 | arduino-airquality - Dust Sensor 2 | ================== 3 | 4 | In the Dust Sensor Module, we are building a standalone Dust Sensor using the Arduino Fio. 5 | 6 | For a detailled documentation including a parts list, check out the following blog post 7 | http://arduinodev.woofex.net/2012/12/01/standalone-sharp-dust-sensor/ 8 | 9 | # Assembly 10 | 11 | ![Dust_SensorArduino](https://raw.github.com/Trefex/arduino-airquality/master/Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing_schem_small.jpg) 12 | 13 | 14 | -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing.fzz -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing_schem.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing_schem.jpg -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing_schem_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/Arduino_Fio_Sketch_Fritzing_schem_small.jpg -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/ArduinoUno_Dust4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/ArduinoUno_Dust4.JPG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust1.JPG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust2.JPG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/Arduino_Dust3.JPG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/SharpDensitycurve.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/SharpDensitycurve.PNG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/Sharp_PulseWidth.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/Sharp_PulseWidth.PNG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/Sharp_Sampling.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/Sharp_Sampling.PNG -------------------------------------------------------------------------------- /Module_Dust-Sensor/assembly/_BlogImages/sharpFromDoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/Module_Dust-Sensor/assembly/_BlogImages/sharpFromDoc.png -------------------------------------------------------------------------------- /Module_Dust-Sensor/dustSensor/dustSensor.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Standalone Sketch to use with a Arduino Fio and a 3 | Sharp Optical Dust Sensor GP2Y1010AU0F 4 | 5 | Blog: http://arduinodev.woofex.net/2012/12/01/standalone-sharp-dust-sensor/ 6 | Code: https://github.com/Trefex/arduino-airquality/ 7 | 8 | For Pin connections, please check the Blog or the github project page 9 | Authors: Cyrille Médard de Chardon (serialC), Christophe Trefois (Trefex) 10 | Changelog: 11 | 2012-Dec-01: Cleaned up code 12 | 2012-Dec-13: Converted mg/m3 to ug/m3 which seems to be the accepted standard 13 | 14 | This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 15 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter 16 | to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. 17 | */ 18 | 19 | int measurePin = 5; 20 | int ledPower = 12; 21 | 22 | int samplingTime = 280; 23 | int deltaTime = 40; 24 | int sleepTime = 9680; 25 | 26 | float voMeasured = 0; 27 | float calcVoltage = 0; 28 | float dustDensity = 0; 29 | 30 | void setup(){ 31 | Serial.begin(9600); 32 | pinMode(ledPower,OUTPUT); 33 | } 34 | 35 | 36 | 37 | 38 | void loop(){ 39 | digitalWrite(ledPower,LOW); // power on the LED 40 | delayMicroseconds(samplingTime); 41 | 42 | voMeasured = analogRead(measurePin); // read the dust value 43 | 44 | delayMicroseconds(deltaTime); 45 | digitalWrite(ledPower,HIGH); // turn the LED off 46 | delayMicroseconds(sleepTime); 47 | 48 | // 0 - 5.0V mapped to 0 - 1023 integer values 49 | calcVoltage = voMeasured * (5.0 / 1024); 50 | 51 | // linear eqaution taken from http://www.howmuchsnow.com/arduino/airquality/ 52 | // Chris Nafis (c) 2012 53 | dustDensity = (0.17 * calcVoltage - 0.1)*1000; 54 | 55 | Serial.print("Raw Signal Value (0-1023): "); 56 | Serial.print(voMeasured); 57 | 58 | Serial.print(" - Voltage: "); 59 | Serial.print(calcVoltage); 60 | 61 | Serial.print(" - Dust Density [ug/m3]: "); 62 | Serial.println(dustDensity); 63 | 64 | delay(1000); 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /Module_Dust-Sensor/example/serial_output_Uno.txt: -------------------------------------------------------------------------------- 1 | Raw Signal Value (0-1023): 170.00 - Voltage: 0.8330 - Dust Density: 0.0416 2 | Raw Signal Value (0-1023): 188.00 - Voltage: 0.9212 - Dust Density: 0.0566 3 | Raw Signal Value (0-1023): 22.00 - Voltage: 0.1078 - Dust Density: -0.0817 4 | Raw Signal Value (0-1023): 321.00 - Voltage: 1.5729 - Dust Density: 0.1674 5 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 6 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 7 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 8 | Raw Signal Value (0-1023): 772.00 - Voltage: 3.7828 - Dust Density: 0.5431 9 | Raw Signal Value (0-1023): 768.00 - Voltage: 3.7632 - Dust Density: 0.5397 10 | Raw Signal Value (0-1023): 766.00 - Voltage: 3.7534 - Dust Density: 0.5381 11 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 12 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 13 | Raw Signal Value (0-1023): 767.00 - Voltage: 3.7583 - Dust Density: 0.5389 14 | -------------------------------------------------------------------------------- /Module_GPS/README.md: -------------------------------------------------------------------------------- 1 | arduino-airquality - GPS 2 | ================== 3 | 4 | In the GPS Module, we are building a standalone GPS device using the Arduino Fio. 5 | This will be used as a module in the AirQuality project. 6 | 7 | Stay tuned for updates. -------------------------------------------------------------------------------- /OpenLogSerialTest/OpenLogSerialTest.ino: -------------------------------------------------------------------------------- 1 | /* OpenLog Test using SoftwareSerial.h 2 | See OpenLog_ReadExample.ino for more examples of interactions using SoftwareSerial 3 | https://github.com/jamescw/OpenGPSLog/blob/master/OpenLog_ReadExample/OpenLog_ReadExample.ino 4 | */ 5 | 6 | #include 7 | 8 | #define OPENLOG_RST_PIN 6 // D6 - Openlogger 9 | #define OPENLOG_TX_PIN 7 // D7 - Openlogger 10 | #define OPENLOG_RX_PIN 8 // D8 - Openlogger 11 | 12 | SoftwareSerial OpenLog(OPENLOG_RX_PIN, OPENLOG_TX_PIN); // RX, TX 13 | boolean openlog_ready = false; 14 | 15 | void setup() { 16 | Serial.begin(115200); 17 | 18 | pinMode(OPENLOG_RST_PIN, OUTPUT); 19 | OpenLog.begin(9600); 20 | 21 | //Reset OpenLog 22 | digitalWrite(OPENLOG_RST_PIN, LOW); 23 | delay(100); 24 | digitalWrite(OPENLOG_RST_PIN, HIGH); 25 | 26 | //Wait for OpenLog to respond with '<' to indicate it is alive and recording to a file 27 | while(1) { 28 | if(OpenLog.available()) { 29 | 30 | // print how much is available 31 | Serial.print("There are ");Serial.print(OpenLog.available()); Serial.println(" characters available."); 32 | 33 | char olr = 'x'; 34 | while( OpenLog.available() > 0) { 35 | olr = OpenLog.read(); 36 | Serial.print(olr); 37 | 38 | if( olr == '<' ) openlog_ready = true; 39 | } 40 | Serial.print("\n"); 41 | if( openlog_ready ) break; 42 | 43 | delay(2000); 44 | } 45 | } 46 | Serial.println("OpenLog is alive and recording."); 47 | } 48 | 49 | void loop() { 50 | OpenLog.println("Hello"); 51 | Serial.println("Wrote: 'Hello' on sd card."); 52 | delay(1000); 53 | } 54 | -------------------------------------------------------------------------------- /OpenLogSerialTest/openlog_breadboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/OpenLogSerialTest/openlog_breadboard.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | arduino-airquality 2 | ================== 3 | 4 | In this project, we are building a mobile Arduino Fio based platform to measure air quality. 5 | 6 | We currently have multiple components working correctly with the Arduino Fio: 7 | 8 | - [x] GPS sensor - Adafruit Ultimate GPS Breakout v3 and the OpenLog 9 | - [x] Dust sensor - Sharp Optical Dust Sensor 10 | - [x] Humidity and temperature sensor - SHT10 by sensiron/DFRobot 11 | - [x] Carbon monoxide sensor - Parallax CO sensor 12 | - [x] Barometric pressure - BMP085 Barometric Pressure/Temperature/Altitude Sensor 13 | 14 | We are working on combining them all into a nice light package. 15 | 16 | Still to do: 17 | - [x] Create circuit board sketch and etch it 18 | - [x] Solder everything on board 19 | - [x] Build enclosure 20 | 21 | Next version improvements: 22 | 23 | 1. Use smaller arduino board (Nano?) potentially one with GPS builtin. 24 | 25 | 2. Decide if we want a 5V board. 26 | 27 | 3. Use 7.4V LI-ion flat and rechargeable battery pack. 28 | 29 | 4. Use only one voltage regulator if we stay with 3.3V. 30 | 31 | 5. Move voltage splitter to monitor voltage to between battery and voltage regulator. 32 | -------------------------------------------------------------------------------- /aq5s/Adafruit_BMP085.h: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | This is a library for the BMP085 Barometric Pressure & Temp Sensor 3 | 4 | Designed specifically to work with the Adafruit BMP085 Breakout 5 | ----> https://www.adafruit.com/products/391 6 | 7 | These displays use I2C to communicate, 2 pins are required to 8 | interface 9 | Adafruit invests time and resources providing this open source code, 10 | please support Adafruit and open-source hardware by purchasing 11 | products from Adafruit! 12 | 13 | Written by Limor Fried/Ladyada for Adafruit Industries. 14 | BSD license, all text above must be included in any redistribution 15 | ****************************************************/ 16 | 17 | #if (ARDUINO >= 100) 18 | #include "Arduino.h" 19 | #else 20 | #include "WProgram.h" 21 | #endif 22 | #include "Wire.h" 23 | 24 | #define BMP085_DEBUG 0 25 | 26 | #define BMP085_I2CADDR 0x77 27 | 28 | #define BMP085_ULTRALOWPOWER 0 29 | #define BMP085_STANDARD 1 30 | #define BMP085_HIGHRES 2 31 | #define BMP085_ULTRAHIGHRES 3 32 | #define BMP085_CAL_AC1 0xAA // R Calibration data (16 bits) 33 | #define BMP085_CAL_AC2 0xAC // R Calibration data (16 bits) 34 | #define BMP085_CAL_AC3 0xAE // R Calibration data (16 bits) 35 | #define BMP085_CAL_AC4 0xB0 // R Calibration data (16 bits) 36 | #define BMP085_CAL_AC5 0xB2 // R Calibration data (16 bits) 37 | #define BMP085_CAL_AC6 0xB4 // R Calibration data (16 bits) 38 | #define BMP085_CAL_B1 0xB6 // R Calibration data (16 bits) 39 | #define BMP085_CAL_B2 0xB8 // R Calibration data (16 bits) 40 | #define BMP085_CAL_MB 0xBA // R Calibration data (16 bits) 41 | #define BMP085_CAL_MC 0xBC // R Calibration data (16 bits) 42 | #define BMP085_CAL_MD 0xBE // R Calibration data (16 bits) 43 | 44 | #define BMP085_CONTROL 0xF4 45 | #define BMP085_TEMPDATA 0xF6 46 | #define BMP085_PRESSUREDATA 0xF6 47 | #define BMP085_READTEMPCMD 0x2E 48 | #define BMP085_READPRESSURECMD 0x34 49 | 50 | 51 | class Adafruit_BMP085 { 52 | public: 53 | Adafruit_BMP085(); 54 | boolean begin(uint8_t mode = BMP085_ULTRAHIGHRES); // by default go highres 55 | float readTemperature(void); 56 | int32_t readPressure(void); 57 | float readAltitude(float sealevelPressure = 101325); // std atmosphere 58 | uint16_t readRawTemperature(void); 59 | uint32_t readRawPressure(void); 60 | 61 | private: 62 | uint8_t read8(uint8_t addr); 63 | uint16_t read16(uint8_t addr); 64 | void write8(uint8_t addr, uint8_t data); 65 | 66 | uint8_t oversampling; 67 | 68 | int16_t ac1, ac2, ac3, b1, b2, mb, mc, md; 69 | uint16_t ac4, ac5, ac6; 70 | }; 71 | 72 | -------------------------------------------------------------------------------- /aq5s/GPS/README.txt: -------------------------------------------------------------------------------- 1 | This is the Adafruit GPS library - the ultimate GPS library 2 | for the ultimate GPS module! 3 | 4 | Tested and works great with the Adafruit Ultimate GPS module 5 | using MTK33x9 chipset 6 | ------> http://www.adafruit.com/products/746 7 | 8 | These modules use TTL serial to communicate, 2 pins are required to 9 | interface 10 | 11 | Adafruit invests time and resources providing this open source code, 12 | please support Adafruit and open-source hardware by purchasing 13 | products from Adafruit! 14 | 15 | Written by Limor Fried/Ladyada for Adafruit Industries. 16 | BSD license, check license.txt for more information 17 | All text above must be included in any redistribution 18 | 19 | To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_GPS. Check that the Adafruit_GPS folder contains Adafruit_GPS.cpp and Adafruit_GPS.h 20 | 21 | Place the Adafruit_GPS library folder your /libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE. -------------------------------------------------------------------------------- /aq5s/GPS/license.txt: -------------------------------------------------------------------------------- 1 | Software License Agreement (BSD License) 2 | 3 | Copyright (c) 2012, Adafruit Industries 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 2. Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 3. Neither the name of the copyright holders nor the 14 | names of its contributors may be used to endorse or promote products 15 | derived from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY 18 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 21 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /aq5s/SHT1x.h: -------------------------------------------------------------------------------- 1 | /** 2 | * SHT1x Library 3 | * 4 | * Copyright 2009 Jonathan Oxer / 5 | * Based on previous work by: 6 | * Maurice Ribble: 7 | * Wayne ?: 8 | * 9 | * Manages communication with SHT1x series (SHT10, SHT11, SHT15) 10 | * temperature / humidity sensors from Sensirion (www.sensirion.com). 11 | */ 12 | #ifndef SHT1x_h 13 | #define SHT1x_h 14 | 15 | #if (ARDUINO >= 100) 16 | #include 17 | #else 18 | #include 19 | #endif 20 | 21 | class SHT1x 22 | { 23 | public: 24 | SHT1x(int dataPin, int clockPin); 25 | float readHumidity(); 26 | float readTemperatureC(); 27 | float retrieveTemperatureC(); 28 | private: 29 | int _dataPin; 30 | int _clockPin; 31 | float _temperatureC; 32 | float readTemperatureRaw(); 33 | int shiftIn(int _dataPin, int _clockPin, int _numBits); 34 | void sendCommandSHT(int _command, int _dataPin, int _clockPin); 35 | void waitForResultSHT(int _dataPin); 36 | int getData16SHT(int _dataPin, int _clockPin); 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /aq5s/sht1x/CHANGES.txt: -------------------------------------------------------------------------------- 1 | 2013-02-22 2 | * Completely changed the library to handle Arduion Fio's 3.3V. 3 | * Minor fixes/cleaning 4 | * Removed fahrenheit functions for temperature 5 | * Removed direct temperature requests, can only be requested after a humidity request (this prevents too many sequential temperature requests which will heat the sensor... (humidity request do a temperature request, we hold this for later retrieval) 6 | 7 | 2011-09-20 8 | * Conditionally include Arduino.h for compatibility with Arduino 1.0 9 | 10 | 2010-07-23 11 | * Added SHT7x to list of supported sensors. 12 | * Fixed temperature offset in humidity calculation. 13 | -------------------------------------------------------------------------------- /aq5s/sht1x/DISTRIBUTION: -------------------------------------------------------------------------------- 1 | Copyright 2009 Jonathan Oxer / 2 | Copyright 2008 Maurice Ribble / 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | http://www.gnu.org/licenses/ 10 | -------------------------------------------------------------------------------- /aq5s/sht1x/README.markdown: -------------------------------------------------------------------------------- 1 | SHT1x Temperature / Humidity Sensor Library for Arduino 2 | ======================================================= 3 | Heavily modified from the original creator's version: 4 | Copyright 2009 Jonathan Oxer jon@oxer.com.au / http://www.practicalarduino.com 5 | Copyright 2008 Maurice Ribble ribblem@yahoo.com / http://www.glacialwanderer.com 6 | 7 | Provides a simple interface to the SHT10 sensor. Made to function with the Arduino Fio (3.3V) 8 | 9 | Installation 10 | ------------ 11 | Download the directory "SHT1x" and move it into the "libraries" 12 | directory inside your sketchbook directory, then restart the Arduino 13 | IDE. You will then see it listed under File->Examples->SHT1x. 14 | 15 | Usage 16 | ----- 17 | The library is instantiated as an object with methods provided to read 18 | relative humidity and temperature. Include it in your sketch and then 19 | create an object, specifying the pins to use for communication with the 20 | sensor: 21 | 22 | #include 23 | #define dataPin 10 24 | #define clockPin 11 25 | SHT1x sht10(dataPin, clockPin); 26 | 27 | You can then call methods on that object within your program. In this 28 | example we created an object called "sht10", but it could have been 29 | called whatever you like. A complete example program is included with 30 | the library and can be accessed from the File->Examples->SHT1x menu. 31 | 32 | ### readTemperatureC() ### 33 | 34 | Returns a float within the valid range of the sensor of -40 to +123.8C. 35 | A value of -273 is returned in the event of a communication error with 36 | the sensor. 37 | 38 | Example: 39 | 40 | float tempC = sht10.readTemperatureC(); 41 | 42 | ### retrieveTemperatureC() ### 43 | 44 | Returns a float of the temperature in celcius that was measured during the humidity measurement. This prevents needing two calls to the temperature sensor. Call the humidyt function readHumidity() then retrieveTemperatureC(). 45 | 46 | ### readHumidity() ### 47 | 48 | Returns a float within the valid range of the sensor of 0 to 100%. 49 | A negative value is returned in the event of a communication error with 50 | the sensor. 51 | 52 | Example: 53 | 54 | float humidity = sht1x.readHumidity(); 55 | -------------------------------------------------------------------------------- /aq6s/Adafruit_BMP085_U.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/aq6s/Adafruit_BMP085_U.cpp -------------------------------------------------------------------------------- /aq6s/Adafruit_Sensor.cpp: -------------------------------------------------------------------------------- 1 | #include "Adafruit_Sensor.h" 2 | #include 3 | 4 | void Adafruit_Sensor::constructor() { 5 | } 6 | -------------------------------------------------------------------------------- /aq6s/Adafruit_Sensor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/aq6s/Adafruit_Sensor.h -------------------------------------------------------------------------------- /aq6s/CONFIG.TXT: -------------------------------------------------------------------------------- 1 | 9600,26,3,0,1,1 2 | baud,escape,esc#,mode,verb,echo -------------------------------------------------------------------------------- /aq6s/COS_MQ7.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | CO Sensor library 3 | COS_MQ7.h - Library for reading the MQ-7 Carbon Monoxide Sensor 4 | Created by J Saavedra, October 2010. 5 | http://jos.ph 6 | Modified by Cyrille Medard de Chardon, Christophe Trefois 2014. 7 | */ 8 | 9 | #include "COS_MQ7.h" 10 | 11 | // Constructor 12 | COS_MQ7::COS_MQ7(int LED_Indicator_Pin, int PWM_Tog_Pin, int CO_Reading_Pin, int V_Reading_Pin, int init_purge_sec){ 13 | 14 | pinMode(LED_Indicator_Pin, OUTPUT); 15 | pinMode(PWM_Tog_Pin, OUTPUT); 16 | pinMode(CO_Reading_Pin, INPUT); 17 | pinMode(V_Reading_Pin, INPUT); 18 | 19 | _LED_Indicator_Pin = LED_Indicator_Pin; 20 | _PWM_Tog_Pin = PWM_Tog_Pin; 21 | _CO_Reading_Pin = CO_Reading_Pin; 22 | _V_Reading_Pin = V_Reading_Pin; 23 | 24 | // set the duration of the initial purge 25 | if (init_purge_sec < 0) { 26 | _init_purge_sec = 500; 27 | } else { 28 | _init_purge_sec = init_purge_sec; 29 | } 30 | 31 | State = 0; 32 | Current_time = millis(); 33 | Last_time = Current_time; 34 | State_duration = 5; // Wait 5 seconds before starting 35 | Reading = -1; 36 | Voltage = -1; 37 | current_reading = -1; 38 | } 39 | 40 | void COS_MQ7::Power_cycle(){ 41 | 42 | Current_time = millis(); 43 | 44 | // get current reading from CO and voltage 45 | current_reading = analogRead(_CO_Reading_Pin); 46 | Voltage = analogRead(_V_Reading_Pin); 47 | 48 | // see if enough time has passed to change state 49 | if ( (Current_time - Last_time) > (State_duration * 1000) ){ 50 | Last_time = Current_time; 51 | State_duration = 0; 52 | 53 | // complete one of the following based on State 54 | switch(State) { 55 | 56 | // initialization purge - only runs on boot/launch 57 | case 0: 58 | State = 1; 59 | State_duration = 500; // 500 seconds at 5v to do initial purge 60 | digitalWrite(_LED_Indicator_Pin, HIGH); 61 | digitalWrite(_PWM_Tog_Pin, HIGH); 62 | break; 63 | 64 | // start heating 65 | case 1: 66 | State = 2; 67 | State_duration = 60; // 60 seconds at 5v 68 | digitalWrite(_LED_Indicator_Pin, HIGH); 69 | digitalWrite(_PWM_Tog_Pin, HIGH); 70 | break; 71 | 72 | // start cooling 73 | case 2: 74 | State = 3; 75 | State_duration = 90; //90 seconds at 1.4v 76 | digitalWrite(_LED_Indicator_Pin, LOW); 77 | analogWrite(_PWM_Tog_Pin, 71); // need to use analogWrite to digital PWM pin 78 | break; 79 | 80 | // cooling is finished, read 'correct' reading 81 | case 3: 82 | State = 4; 83 | Reading = current_reading; 84 | break; 85 | 86 | case 4: 87 | // indefinite state until the value is read 88 | break; 89 | } 90 | } 91 | } 92 | 93 | int COS_MQ7::Get_CO_reading(){ 94 | // will begin heating again after next Power_cycle() call 95 | int tmpRet; 96 | State = 1; // restart 60s purge 97 | tmpRet = Reading; 98 | Reading = -1; 99 | return tmpRet; 100 | } 101 | 102 | int COS_MQ7::Get_current_CO_reading(){ 103 | return current_reading; 104 | } 105 | 106 | int COS_MQ7::Get_Voltage_reading(){ 107 | return Voltage; 108 | } 109 | 110 | int COS_MQ7::Get_state(){ 111 | return State; 112 | } 113 | -------------------------------------------------------------------------------- /aq6s/COS_MQ7.h: -------------------------------------------------------------------------------- 1 | /* 2 | COS_MQ7.h - Library for reading the MQ-7 Carbon Monoxide Sensor 3 | Released into the public domain. 4 | Created by J Saavedra, October 2010. 5 | http://jos.ph 6 | Modified by Cyrille Medard de Chardon, Christophe Trefois 2014. 7 | */ 8 | 9 | 10 | #ifndef COS_MQ7_h 11 | #define COS_MQ7_h 12 | 13 | #if ARDUINO >= 100 14 | #include "Arduino.h" 15 | #else 16 | #include "WProgram.h" 17 | #endif 18 | 19 | class COS_MQ7{ 20 | 21 | public: 22 | COS_MQ7(int LED_Indicator_Pin, int PWM_Tog_Pin, int CO_Reading_Pin, int V_Reading_Pin, int init_purge_sec); 23 | void Power_cycle(); 24 | int Get_state(); 25 | int Get_CO_reading(); 26 | int Get_current_CO_reading(); 27 | int Get_Voltage_reading(); 28 | 29 | private: 30 | unsigned long Current_time; 31 | unsigned long Last_time; 32 | unsigned long State_duration; 33 | 34 | int _LED_Indicator_Pin; 35 | int _PWM_Tog_Pin; 36 | int _CO_Reading_Pin; 37 | int _V_Reading_Pin; 38 | int _init_purge_sec; 39 | 40 | int State; 41 | int Reading; 42 | int current_reading; 43 | int Voltage; 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /aq6s/README.md: -------------------------------------------------------------------------------- 1 | arduino-airquality - CO Sensor 2 | ================== 3 | 4 | 2013-Dec-22 5 | - You need to add the StandardCpp folder to your Arduino Library, or the Sketch will not compile 6 | 7 | 8 | -------------------------------------------------------------------------------- /aq6s/SHT1x.h: -------------------------------------------------------------------------------- 1 | /** 2 | * SHT1x Library 3 | * 4 | * Copyright 2009 Jonathan Oxer / 5 | * Based on previous work by: 6 | * Maurice Ribble: 7 | * Wayne ?: 8 | * 9 | * Manages communication with SHT1x series (SHT10, SHT11, SHT15) 10 | * temperature / humidity sensors from Sensirion (www.sensirion.com). 11 | */ 12 | #ifndef SHT1x_h 13 | #define SHT1x_h 14 | 15 | #if (ARDUINO >= 100) 16 | #include 17 | #else 18 | #include 19 | #endif 20 | 21 | class SHT1x 22 | { 23 | public: 24 | SHT1x(int dataPin, int clockPin); 25 | float readHumidity(); 26 | float readTemperatureC(); 27 | float retrieveTemperatureC(); 28 | private: 29 | int _dataPin; 30 | int _clockPin; 31 | float _temperatureC; 32 | float readTemperatureRaw(); 33 | int shiftIn(int _dataPin, int _clockPin, int _numBits); 34 | void sendCommandSHT(int _command, int _dataPin, int _clockPin); 35 | void waitForResultSHT(int _dataPin); 36 | int getData16SHT(int _dataPin, int _clockPin); 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/.gitignore: -------------------------------------------------------------------------------- 1 | 16000000/ 2 | .*.swp 3 | *.orig 4 | *.bak 5 | version.h 6 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/Jamfile: -------------------------------------------------------------------------------- 1 | UCLIBCPP_DIR = $(HOME)/Source/uClibc++ ; 2 | 3 | rule FixCopy 4 | { 5 | Depends $(<) : $(>) ; 6 | Clean clean : $(<) ; 7 | Depends all : $(<) ; 8 | } 9 | 10 | actions FixCopy 11 | { 12 | sed -e "s///g" $(>) > $(<) 13 | } 14 | 15 | for file in [ GLOB $(UCLIBCPP_DIR)/include : [^.]* ] 16 | { 17 | local _o = $(file:D=$(PWD)) ; 18 | if ( $(file:B) = "utility" ) 19 | { 20 | _o = $(_o:S=.h) ; 21 | } 22 | FixCopy $(_o) : $(file) ; 23 | } 24 | 25 | for file in [ GLOB $(UCLIBCPP_DIR)/src : *.cpp ] 26 | { 27 | local _o = $(file:D=$(PWD)) ; 28 | FixCopy $(_o) : $(file) ; 29 | } 30 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/Makefile: -------------------------------------------------------------------------------- 1 | TOPDIR=../ 2 | include $(TOPDIR)Rules.mak 3 | 4 | all: 5 | 6 | clean: 7 | 8 | distclean: 9 | 10 | HEADERS = $(filter-out .svn CVS Makefile,$(wildcard *)) 11 | install: 12 | $(INSTALL) -d $(PREFIX)$(UCLIBCXX_RUNTIME_INCLUDEDIR) 13 | $(INSTALL) -m 644 $(HEADERS) $(PREFIX)$(UCLIBCXX_RUNTIME_INCLUDEDIR) 14 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/README.md: -------------------------------------------------------------------------------- 1 | # Standard C++ for Arduino 2 | 3 | ## What is this? 4 | 5 | This is a straight port of [uClibc++](http://cxx.uclibc.org/) for Arduino. 6 | I have cut nothing out and held nothing back. Use with care! 7 | 8 | That said, I have used uClibc++'s own internal configuration to pare back 9 | un-needed stuff, like support for floats, gratuitous template 10 | instantiations and other things. See system\_configuration.h for all of 11 | those gory details. 12 | 13 | Plus I added in [Andy Brown's](http://andybrown.me.uk/ws/2011/01/15/the-standard-template-library-stl-for-avr-with-c-streams/#IDComment246044033) 14 | excellent ohserialstream class for managing the HardwareSerial as an ostream. 15 | 16 | ## How do I install it? 17 | 18 | This is installed just like a regular Arduino library. Unpack the contents 19 | of the distribution into the 'libraries' folder under your sketchbook. For 20 | example, my sketchbook is at /home/maniacbug/Source/Arduino, so this 21 | library is in /home/maniacbug/Source/Arduino/libraries/StandardCplusplus . 22 | 23 | Be sure to reset your Arduino IDE after installing it. 24 | 25 | ## How do I try it out? 26 | 27 | From the Arduino IDE, navigate the menus to: 28 | File > Examples > StandardCplusplus > string\_vector 29 | 30 | Upload that, set your serial monitor to 57600 baud, and check the output. 31 | 32 | ## How do I learn more? 33 | 34 | The web is your friend. [cplusplus.com](http://cplusplus.com/reference/) is my personal favorite reference. 35 | 36 | ## Which versions does it work with? 37 | 38 | Arduino 1.0 and beyond. 39 | 40 | ## What is the license? 41 | 42 | uClibc++ is LGPL, so this port is also. Andy's file is actually 43 | CC-BY-SA, however he indicated he'd be releasing it using the 3-clause 44 | modified BSD license, so it will be fully compatible with uClibc++. 45 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/StandardCplusplus.h: -------------------------------------------------------------------------------- 1 | #undef abs 2 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/algorithm.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | 21 | #include 22 | 23 | 24 | namespace std{ 25 | 26 | 27 | 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/associative_base.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/basic_definitions: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public 14 | License along with this library; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | */ 17 | 18 | #ifndef __BASIC_DEFINITIONS 19 | #define __BASIC_DEFINITIONS 1 20 | 21 | #include 22 | 23 | #pragma GCC visibility push(default) 24 | 25 | //The following is used to support GCC symbol visibility patch 26 | 27 | #ifdef GCC_HASCLASSVISIBILITY 28 | #define _UCXXEXPORT __attribute__ ((visibility("default"))) 29 | #define _UCXXLOCAL __attribute__ ((visibility("hidden"))) 30 | #else 31 | #define _UCXXEXPORT 32 | #define _UCXXLOCAL 33 | 34 | #endif 35 | 36 | #ifdef __GCC__ 37 | #define __UCLIBCXX_NORETURN __attribute__ ((__noreturn__)) 38 | #else 39 | #define __UCLIBCXX_NORETURN 40 | #endif 41 | 42 | #ifdef __UCLIBCXX_HAS_TLS__ 43 | #define __UCLIBCXX_TLS __thread 44 | #else 45 | #define __UCLIBCXX_TLS 46 | #endif 47 | 48 | 49 | 50 | //Testing purposes 51 | #define __STRING_MAX_UNITS 65535 52 | 53 | namespace std{ 54 | typedef signed long int streamsize; 55 | } 56 | 57 | #pragma GCC visibility pop 58 | 59 | #endif 60 | 61 | 62 | #ifdef __DODEBUG__ 63 | #define UCLIBCXX_DEBUG 1 64 | #else 65 | #define UCLIBCXX_DEBUG 0 66 | #endif 67 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/bitset.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cassert: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cctype: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | namespace std{ 22 | 23 | using ::isalnum; 24 | using ::isalpha; 25 | using ::iscntrl; 26 | using ::isdigit; 27 | using ::isgraph; 28 | using ::islower; 29 | using ::isprint; 30 | using ::ispunct; 31 | using ::isspace; 32 | using ::isupper; 33 | using ::isxdigit; 34 | using ::tolower; 35 | using ::toupper; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cerrno: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cfloat: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #ifndef __STD_HEADER_CFLOAT 23 | #define __STD_HEADER_CFLOAT 1 24 | 25 | 26 | #include 27 | 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/char_traits.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | */ 20 | 21 | #define __UCLIBCXX_COMPILE_CHAR_TRAITS__ 1 22 | 23 | 24 | #include 25 | #include 26 | 27 | namespace std{ 28 | 29 | _UCXXEXPORT const char_traits::char_type* char_traits::find(const char_type* s, int n, const char_type& a){ 30 | for(int i=0; i < n; i++){ 31 | if(eq(s[i], a)){ 32 | return (s+i); 33 | } 34 | } 35 | return 0; 36 | } 37 | 38 | _UCXXEXPORT bool char_traits::eq(const char_type& c1, const char_type& c2){ 39 | if(strncmp(&c1, &c2, 1) == 0){ 40 | return true; 41 | } 42 | return false; 43 | } 44 | 45 | _UCXXEXPORT char_traits::char_type char_traits::to_char_type(const int_type & i){ 46 | if(i > 0 && i <= 255){ 47 | return (char)(unsigned char)i; 48 | } 49 | 50 | //Out of range 51 | return 0; 52 | } 53 | 54 | 55 | 56 | #ifdef __UCLIBCXX_HAS_WCHAR__ 57 | 58 | _UCXXEXPORT const char_traits::char_type* char_traits::find(const char_type* s, int n, const char_type& a){ 59 | for(int i=0; i < n; i++){ 60 | if(eq(s[i], a)){ 61 | return (s+i); 62 | } 63 | } 64 | return 0; 65 | } 66 | 67 | #endif 68 | 69 | } 70 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/climits: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #ifndef __STD_HEADER_CLIMITS 21 | #define __STD_HEADER_CLIMITS 1 22 | 23 | 24 | #include 25 | 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/clocale: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #ifndef __STD_HEADER_CLOCALE 20 | #define __STD_HEADER_CLOCALE 1 21 | 22 | #include 23 | 24 | namespace std { 25 | using ::lconv; 26 | using ::setlocale; 27 | using ::localeconv; 28 | } 29 | 30 | #endif // __STD_HEADER_CLOCALE 31 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/complex.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | template class _UCXXEXPORT complex; 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/csetjmp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #ifndef __STD_HEADER_CSETJMP 23 | #define __STD_HEADER_CSETJMP 1 24 | 25 | 26 | //From GCC Header files 27 | #undef longjmp 28 | 29 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 30 | #ifndef setjmp 31 | #define setjmp(env) setjmp (env) 32 | #endif 33 | 34 | //Mine again 35 | 36 | 37 | namespace std{ 38 | using ::longjmp; 39 | using ::jmp_buf; 40 | } 41 | 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/csignal: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | // 32 | // ISO C++ 14882: 20.4.6 C library 33 | // 34 | 35 | /** @file csignal 36 | * This is a Standard C++ Library file. You should @c #include this file 37 | * in your programs, rather than any of the "*.h" implementation files. 38 | * 39 | * This is the C++ version of the Standard C Library header @c signal.h, 40 | * and its contents are (mostly) the same as that header, but are all 41 | * contained in the namespace @c std. 42 | */ 43 | 44 | #ifndef _CPP_CSIGNAL 45 | #define _CPP_CSIGNAL 1 46 | 47 | #pragma GCC system_header 48 | 49 | #include 50 | 51 | // Get rid of those macros defined in in lieu of real functions. 52 | #undef raise 53 | 54 | namespace std 55 | { 56 | using ::sig_atomic_t; 57 | using ::signal; 58 | using ::raise; 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cstdarg: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | // 31 | // ISO C++ 14882: 20.4.6 C library 32 | // 33 | 34 | /** @file cstdarg 35 | * This is a Standard C++ Library file. You should @c #include this file 36 | * in your programs, rather than any of the "*.h" implementation files. 37 | * 38 | * This is the C++ version of the Standard C Library header @c stdarg.h, 39 | * and its contents are (mostly) the same as that header, but are all 40 | * contained in the namespace @c std. 41 | */ 42 | 43 | #ifndef _CPP_CSTDARG 44 | #define _CPP_CSTDARG 1 45 | 46 | #pragma GCC system_header 47 | 48 | #include 49 | 50 | // Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998 51 | #ifndef va_end 52 | #define va_end(ap) va_end (ap) 53 | #endif 54 | 55 | namespace std 56 | { 57 | using ::va_list; 58 | } 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cstddef: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc. 4 | // 5 | // This file is part of the GNU ISO C++ Library. This library is free 6 | // software; you can redistribute it and/or modify it under the 7 | // terms of the GNU General Public License as published by the 8 | // Free Software Foundation; either version 2, or (at your option) 9 | // any later version. 10 | 11 | // This library is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | 16 | // You should have received a copy of the GNU General Public License along 17 | // with this library; see the file COPYING. If not, write to the Free 18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 19 | // USA. 20 | 21 | // As a special exception, you may use this file as part of a free software 22 | // library without restriction. Specifically, if other files instantiate 23 | // templates or use macros or inline functions from this file, or you compile 24 | // this file and link it with other files to produce an executable, this 25 | // file does not by itself cause the resulting executable to be covered by 26 | // the GNU General Public License. This exception does not however 27 | // invalidate any other reasons why the executable file might be covered by 28 | // the GNU General Public License. 29 | 30 | // 31 | // ISO C++ 14882: 18.1 Types 32 | // 33 | 34 | /** @file cstddef 35 | * This is a Standard C++ Library file. You should @c #include this file 36 | * in your programs, rather than any of the "*.h" implementation files. 37 | * 38 | * This is the C++ version of the Standard C Library header @c stddef.h, 39 | * and its contents are (mostly) the same as that header, but are all 40 | * contained in the namespace @c std. 41 | */ 42 | 43 | #ifndef _CPP_CSTDDEF 44 | #define _CPP_CSTDDEF 1 45 | 46 | #ifdef __GCC__ 47 | #pragma GCC system_header 48 | #endif 49 | 50 | #include 51 | 52 | namespace std 53 | { 54 | using ::ptrdiff_t; 55 | using ::size_t; 56 | } 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cstdio: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation version 2.1 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public 14 | License along with this library; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | #ifndef __HEADER_CSTDIO 22 | #define __HEADER_CSTDIO 1 23 | 24 | 25 | namespace std{ 26 | #if ! defined(__AVR__) 27 | using ::FILE; 28 | using ::fpos_t; 29 | using ::fgetpos; 30 | using ::fopen; 31 | using ::freopen; 32 | using ::fseek; 33 | using ::fsetpos; 34 | using ::ftell; 35 | using ::perror; 36 | using ::rename; 37 | using ::rewind; 38 | using ::setbuf; 39 | using ::setvbuf; 40 | using ::tmpfile; 41 | using ::tmpnam; 42 | using ::remove; 43 | #endif // ! defined(__AVR__) 44 | 45 | using ::clearerr; 46 | using ::fclose; 47 | using ::feof; 48 | using ::ferror; 49 | using ::fflush; 50 | using ::fgetc; 51 | using ::fgets; 52 | using ::fprintf; 53 | using ::fputc; 54 | using ::fputs; 55 | using ::fread; 56 | using ::fscanf; 57 | using ::fwrite; 58 | using ::getc; 59 | using ::getchar; 60 | using ::gets; 61 | using ::printf; 62 | using ::putc; 63 | using ::putchar; 64 | using ::puts; 65 | using ::scanf; 66 | using ::sprintf; 67 | using ::sscanf; 68 | using ::ungetc; 69 | using ::vfprintf; 70 | using ::vprintf; 71 | using ::vsprintf; 72 | } 73 | 74 | 75 | 76 | #endif 77 | 78 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cstdlib: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #ifndef __HEADER_CSTDLIB 23 | #define __HEADER_CSTDLIB 1 24 | 25 | 26 | namespace std{ 27 | #if ! defined(__AVR__) 28 | using ::atexit; 29 | using ::getenv; 30 | using ::system; 31 | #endif // ! defined(__AVR__) 32 | using ::abort; 33 | using ::abs; 34 | using ::atol; 35 | using ::atof; 36 | using ::atoi; 37 | using ::bsearch; 38 | using ::calloc; 39 | using ::div; 40 | using ::exit; 41 | using ::free; 42 | using ::labs; 43 | using ::ldiv; 44 | using ::malloc; 45 | using ::qsort; 46 | using ::rand; 47 | using ::realloc; 48 | using ::srand; 49 | using ::strtod; 50 | using ::strtol; 51 | using ::strtoul; 52 | #ifdef __UCLIBCXX_HAS_WCHAR__ 53 | using ::mblen; 54 | using ::mbstowcs; 55 | using ::mbtowc; 56 | using ::wctomb; 57 | using ::wcstombs; 58 | #endif 59 | 60 | inline long abs(long i){ 61 | return labs(i); 62 | } 63 | 64 | inline ldiv_t div(long i, long j){ 65 | return ldiv(i, j); 66 | } 67 | 68 | } 69 | 70 | 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cstring: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #ifndef __HEADER_CSTRING 23 | #define __HEADER_CSTRING 1 24 | 25 | 26 | namespace std{ 27 | #if ! defined(__AVR__) 28 | using ::strcoll; 29 | using ::strerror; 30 | using ::strxfrm; 31 | #endif // ! defined(__AVR__) 32 | 33 | using ::memchr; 34 | using ::memcmp; 35 | using ::memcpy; 36 | using ::memmove; 37 | using ::memset; 38 | using ::strcat; 39 | using ::strchr; 40 | using ::strcmp; 41 | using ::strcpy; 42 | using ::strcspn; 43 | using ::strlen; 44 | using ::strncat; 45 | using ::strncmp; 46 | using ::strncpy; 47 | using ::strpbrk; 48 | using ::strrchr; 49 | using ::strspn; 50 | using ::strstr; 51 | using ::strtok; 52 | 53 | #ifndef __CORRECT_ISO_CPP_STRING_H_PROTO 54 | //Extra definitions required in c++ spec 55 | 56 | inline void* memchr(void* s, int c, size_t n){ 57 | return memchr(const_cast(s), c, n); 58 | } 59 | 60 | inline char* strchr(char* s, int c){ 61 | return strchr(const_cast(s), c); 62 | } 63 | 64 | inline char* strpbrk(char* s1, const char* s2){ 65 | return strpbrk(const_cast(s1), s2); 66 | } 67 | 68 | inline char* strrchr(char* s, int c){ 69 | return strrchr(const_cast(s), c); 70 | } 71 | 72 | inline char* strstr(char* s1, const char* s2){ 73 | return strstr(const_cast(s1), s2); 74 | } 75 | #endif 76 | } 77 | 78 | #endif 79 | 80 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/ctime: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | // 32 | // ISO C++ 14882: 20.5 Date and time 33 | // 34 | 35 | /** @file ctime 36 | * This is a Standard C++ Library file. You should @c #include this file 37 | * in your programs, rather than any of the "*.h" implementation files. 38 | * 39 | * This is the C++ version of the Standard C Library header @c time.h, 40 | * and its contents are (mostly) the same as that header, but are all 41 | * contained in the namespace @c std. 42 | */ 43 | 44 | #ifndef _CPP_CTIME 45 | #define _CPP_CTIME 1 46 | 47 | #pragma GCC system_header 48 | 49 | #include 50 | 51 | #include 52 | 53 | // Get rid of those macros defined in in lieu of real functions. 54 | #undef clock 55 | #undef difftime 56 | #undef mktime 57 | #undef time 58 | #undef asctime 59 | #undef ctime 60 | #undef gmtime 61 | #undef localtime 62 | #undef strftime 63 | 64 | namespace std 65 | { 66 | using ::clock_t; 67 | using ::time_t; 68 | using ::tm; 69 | 70 | using ::clock; 71 | using ::difftime; 72 | using ::mktime; 73 | using ::time; 74 | using ::asctime; 75 | using ::ctime; 76 | using ::gmtime; 77 | using ::localtime; 78 | using ::strftime; 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cwchar: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation version 2.1 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public 14 | License along with this library; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | #ifndef __HEADER_CWCHAR 22 | #define __HEADER_CWCHAR 1 23 | 24 | 25 | namespace std{ 26 | using ::mbstate_t; 27 | using ::wint_t; 28 | 29 | using ::btowc; 30 | using ::fgetwc; 31 | using ::fgetws; 32 | using ::fputwc; 33 | using ::fputws; 34 | using ::fwide; 35 | using ::fwprintf; 36 | using ::fwscanf; 37 | using ::getwc; 38 | using ::getwchar; 39 | using ::mbrlen; 40 | using ::mbrtowc; 41 | using ::mbsinit; 42 | using ::mbsrtowcs; 43 | using ::putwc; 44 | using ::putwchar; 45 | using ::swprintf; 46 | using ::swscanf; 47 | using ::ungetwc; 48 | using ::vfwprintf; 49 | using ::vswprintf; 50 | using ::vwprintf; 51 | using ::wcrtomb; 52 | using ::wcscat; 53 | using ::wcschr; 54 | using ::wcscmp; 55 | using ::wcscoll; 56 | using ::wcscpy; 57 | using ::wcscspn; 58 | using ::wcsftime; 59 | using ::wcslen; 60 | using ::wcsncat; 61 | using ::wcsncmp; 62 | using ::wcsncpy; 63 | using ::wcspbrk; 64 | using ::wcsrchr; 65 | using ::wcsrtombs; 66 | using ::wcsspn; 67 | using ::wcsstr; 68 | using ::wcstod; 69 | using ::wcstok; 70 | using ::wcstol; 71 | using ::wcstoul; 72 | using ::wcsxfrm; 73 | using ::wctob; 74 | using ::wmemchr; 75 | using ::wmemcmp; 76 | using ::wmemcpy; 77 | using ::wmemmove; 78 | using ::wmemset; 79 | using ::wprintf; 80 | using ::wscanf; 81 | } 82 | 83 | 84 | 85 | #endif 86 | 87 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/cwctype: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- forwarding header. 2 | 3 | // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 4 | // Free Software Foundation, Inc. 5 | // 6 | // This file is part of the GNU ISO C++ Library. This library is free 7 | // software; you can redistribute it and/or modify it under the 8 | // terms of the GNU General Public License as published by the 9 | // Free Software Foundation; either version 2, or (at your option) 10 | // any later version. 11 | 12 | // This library is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | 17 | // You should have received a copy of the GNU General Public License along 18 | // with this library; see the file COPYING. If not, write to the Free 19 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 20 | // USA. 21 | 22 | // As a special exception, you may use this file as part of a free software 23 | // library without restriction. Specifically, if other files instantiate 24 | // templates or use macros or inline functions from this file, or you compile 25 | // this file and link it with other files to produce an executable, this 26 | // file does not by itself cause the resulting executable to be covered by 27 | // the GNU General Public License. This exception does not however 28 | // invalidate any other reasons why the executable file might be covered by 29 | // the GNU General Public License. 30 | 31 | // 32 | // ISO C++ 14882: 33 | // 34 | 35 | /** @file cwctype 36 | * This is a Standard C++ Library file. You should @c #include this file 37 | * in your programs, rather than any of the "*.h" implementation files. 38 | * 39 | * This is the C++ version of the Standard C Library header @c wctype.h, 40 | * and its contents are (mostly) the same as that header, but are all 41 | * contained in the namespace @c std. 42 | */ 43 | 44 | #ifndef _CPP_CWCTYPE 45 | #define _CPP_CWCTYPE 1 46 | 47 | #pragma GCC system_header 48 | 49 | //#include 50 | 51 | #ifdef __UCLIBCXX_HAS_WCHAR__ 52 | #include 53 | #endif 54 | 55 | // Get rid of those macros defined in in lieu of real functions. 56 | #undef iswalnum 57 | #undef iswalpha 58 | #undef iswblank 59 | #undef iswcntrl 60 | #undef iswdigit 61 | #undef iswgraph 62 | #undef iswlower 63 | #undef iswprint 64 | #undef iswprint 65 | #undef iswpunct 66 | #undef iswspace 67 | #undef iswupper 68 | #undef iswxdigit 69 | #undef iswctype 70 | #undef towlower 71 | #undef towupper 72 | #undef towctrans 73 | #undef wctrans 74 | #undef wctype 75 | 76 | #if __UCLIBCXX_HAS_WCHAR__ 77 | namespace std 78 | { 79 | using ::wint_t; // cwchar 80 | 81 | using ::wctype_t; 82 | using ::wctrans_t; 83 | 84 | using ::iswalnum; 85 | using ::iswalpha; 86 | using ::iswblank; 87 | using ::iswcntrl; 88 | using ::iswdigit; 89 | using ::iswgraph; 90 | using ::iswlower; 91 | using ::iswprint; 92 | using ::iswprint; 93 | using ::iswpunct; 94 | using ::iswspace; 95 | using ::iswupper; 96 | using ::iswxdigit; 97 | using ::iswctype; 98 | using ::towlower; 99 | using ::towupper; 100 | using ::towctrans; 101 | using ::wctrans; 102 | using ::wctype; 103 | } 104 | #endif //__ULIBCXX_HAS_WCHAR__ 105 | 106 | #endif 107 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/del_op.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ! defined(ARDUINO) || ( ARDUINO < 100 ) 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void operator delete(void* ptr) throw(){ 28 | free(ptr); 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/del_opnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() { 26 | free(ptr); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/del_opv.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | // Arduino now defines this. 25 | //_UCXXEXPORT void operator delete[](void * ptr) throw(){ 26 | // free(ptr); 27 | //} 28 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/del_opvnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void operator delete[](void* ptr, const std::nothrow_t& ) throw(){ 26 | free(ptr); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/deque.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | 23 | namespace std{ 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | } 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/eh_alloc.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation, version 2.1 8 | of the License. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | //This is a system-specific header which does all of the error-handling management 25 | #include 26 | 27 | namespace __cxxabiv1{ 28 | 29 | extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw(){ 30 | void *retval; 31 | //The sizeof crap is required by Itanium ABI because we need to provide space for 32 | //accounting information which is implementaion (gcc) specified 33 | retval = malloc (thrown_size + sizeof(__cxa_exception)); 34 | if (0 == retval){ 35 | std::terminate(); 36 | } 37 | memset (retval, 0, sizeof(__cxa_exception)); 38 | return (void *)((unsigned char *)retval + sizeof(__cxa_exception)); 39 | } 40 | 41 | extern "C" void __cxa_free_exception(void *vptr) throw(){ 42 | free( (char *)(vptr) - sizeof(__cxa_exception) ); 43 | } 44 | 45 | 46 | extern "C" __cxa_dependent_exception * __cxa_allocate_dependent_exception() throw(){ 47 | __cxa_dependent_exception *retval; 48 | //The sizeof crap is required by Itanium ABI because we need to provide space for 49 | //accounting information which is implementaion (gcc) specified 50 | retval = static_cast<__cxa_dependent_exception*>(malloc (sizeof(__cxa_dependent_exception))); 51 | if (0 == retval){ 52 | std::terminate(); 53 | } 54 | memset (retval, 0, sizeof(__cxa_dependent_exception)); 55 | return retval; 56 | } 57 | 58 | extern "C" void __cxa_free_dependent_exception(__cxa_dependent_exception *vptr) throw(){ 59 | free( (char *)(vptr) ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/eh_globals.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation, version 2.1 8 | of the License. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | //This is a system-specific header which does all of the error-handling management 25 | #include 26 | 27 | //The following functionality is derived from reading of the GNU libstdc++ code and making it...simple 28 | 29 | 30 | namespace __cxxabiv1{ 31 | 32 | static __UCLIBCXX_TLS __cxa_eh_globals eh_globals; 33 | 34 | extern "C" __cxa_eh_globals* __cxa_get_globals() throw(){ 35 | return &eh_globals; 36 | } 37 | 38 | extern "C" __cxa_eh_globals* __cxa_get_globals_fast() throw(){ 39 | return &eh_globals; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/examples/serstream/more.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void more(void) 5 | { 6 | Serial.print("more"); 7 | 8 | std::cout << 1.0f; 9 | } 10 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/examples/serstream/runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | jam u0 && expect test.ex 4 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/examples/serstream/serstream.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | // declares cout/cerr, but the application must define them 8 | // because it's up to you what to do with them. 9 | namespace std 10 | { 11 | ohserialstream cout(Serial); 12 | } 13 | 14 | extern void more(void); 15 | 16 | void setup(void) 17 | { 18 | Serial.begin(57600); 19 | 20 | cout << "Hello, world." << endl; 21 | 22 | cout << F("I use up absolutely no RAM space whatsoever") << endl; 23 | cout << F("so you can use as many F() strings as you want!") << endl; 24 | 25 | float fmax = __FLT_MAX__, fmin = __FLT_MIN__; 26 | cout.precision(7); 27 | cout << "Float " << scientific << fmax << endl; 28 | cout << "Float " << scientific << fmin << endl; 29 | 30 | more(); 31 | 32 | cout << "+OK" << endl; 33 | 34 | int n = 3; 35 | int (*button)[3] = new int[n][3]; 36 | } 37 | 38 | void loop(void) 39 | { 40 | } 41 | 42 | // vim:cin:ai:sts=2 sw=2 ft=cpp 43 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/examples/serstream/test.ex: -------------------------------------------------------------------------------- 1 | #/usr/bin/expect 2 | 3 | set timeout 100 4 | spawn picocom -b 57600 /dev/ttyUSB0 5 | expect "+OK" 6 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/examples/string_vector/string_vector.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | using namespace std; 8 | 9 | // declares cout/cerr, but the application must define them 10 | // because it's up to you what to do with them. 11 | namespace std 12 | { 13 | ohserialstream cout(Serial); 14 | } 15 | 16 | vector strings; 17 | 18 | void setup(void) 19 | { 20 | Serial.begin(57600); 21 | 22 | strings.push_back("Hello,"); 23 | strings.push_back("world!"); 24 | copy(strings.begin(),strings.end(),ostream_iterator(cout," ")); 25 | cout << endl; 26 | } 27 | 28 | void loop(void) 29 | { 30 | } 31 | 32 | // vim:cin:ai:sts=2 sw=2 ft=cpp 33 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/exception.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | */ 20 | 21 | #include 22 | 23 | //We can't do this yet because gcc is too stupid to be able to handle 24 | //different implementations of exception class. 25 | 26 | #undef __UCLIBCXX_EXCEPTION_SUPPORT__ 27 | 28 | #ifdef __UCLIBCXX_EXCEPTION_SUPPORT__ 29 | 30 | namespace std{ 31 | _UCXXEXPORT static char * __std_exception_what_value = "exception"; 32 | 33 | //We are providing our own versions to be sneaky 34 | 35 | 36 | _UCXXEXPORT exception::~exception() throw(){ 37 | //Empty function 38 | } 39 | 40 | _UCXXEXPORT const char* exception::what() const throw(){ 41 | return __std_exception_what_value; 42 | } 43 | 44 | _UCXXEXPORT bad_exception::~bad_exception() throw(){ 45 | 46 | } 47 | 48 | 49 | } 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/func_exception: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | 24 | #ifndef HEADER_IMPLEMENTATION_FUNC_EXCEPTION 25 | #define HEADER_IMPLEMENTATION_FUNC_EXCEPTION 26 | 27 | #pragma GCC visibility push(default) 28 | 29 | namespace std{ 30 | 31 | _UCXXEXPORT void __throw_bad_alloc(); 32 | _UCXXEXPORT void __throw_out_of_range(const char * message = 0); 33 | _UCXXEXPORT void __throw_overflow_error(const char * message = 0); 34 | _UCXXEXPORT void __throw_length_error(const char * message = 0); 35 | _UCXXEXPORT void __throw_invalid_argument(const char * message = 0); 36 | } 37 | 38 | #pragma GCC visibility pop 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/func_exception.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace std{ 26 | 27 | #ifdef __UCLIBCXX_EXCEPTION_SUPPORT__ 28 | 29 | _UCXXEXPORT void __throw_bad_alloc(){ 30 | throw bad_alloc(); 31 | } 32 | 33 | _UCXXEXPORT void __throw_out_of_range( const char * message){ 34 | if(message == 0){ 35 | throw out_of_range(); 36 | } 37 | throw out_of_range(message); 38 | } 39 | 40 | _UCXXEXPORT void __throw_overflow_error( const char * message){ 41 | if(message == 0){ 42 | throw overflow_error(); 43 | } 44 | throw overflow_error(message); 45 | } 46 | 47 | _UCXXEXPORT void __throw_length_error(const char * message){ 48 | if(message == 0){ 49 | throw length_error(); 50 | } 51 | throw length_error(message); 52 | } 53 | 54 | _UCXXEXPORT void __throw_invalid_argument(const char * message){ 55 | if(message == 0){ 56 | throw invalid_argument(); 57 | } 58 | throw invalid_argument(message); 59 | } 60 | 61 | #else 62 | 63 | _UCXXEXPORT void __throw_bad_alloc(){ 64 | abort(); 65 | } 66 | 67 | _UCXXEXPORT void __throw_out_of_range( const char * ){ 68 | abort(); 69 | } 70 | 71 | _UCXXEXPORT void __throw_overflow_error( const char * ){ 72 | abort(); 73 | } 74 | 75 | _UCXXEXPORT void __throw_length_error(const char * ){ 76 | abort(); 77 | } 78 | 79 | _UCXXEXPORT void __throw_invalid_argument(const char *){ 80 | abort(); 81 | } 82 | 83 | #endif 84 | 85 | 86 | 87 | } 88 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/initializer_list: -------------------------------------------------------------------------------- 1 | // std::initializer_list support -*- C++ -*- 2 | 3 | // Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 4 | // 5 | // This file is part of GCC. 6 | // 7 | // GCC is free software; you can redistribute it and/or modify 8 | // it under the terms of the GNU General Public License as published by 9 | // the Free Software Foundation; either version 3, or (at your option) 10 | // any later version. 11 | // 12 | // GCC is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // Under Section 7 of GPL version 3, you are granted additional 18 | // permissions described in the GCC Runtime Library Exception, version 19 | // 3.1, as published by the Free Software Foundation. 20 | 21 | // You should have received a copy of the GNU General Public License and 22 | // a copy of the GCC Runtime Library Exception along with this program; 23 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 | // . 25 | 26 | /** @file initializer_list 27 | * This is a Standard C++ Library header. 28 | */ 29 | 30 | #ifndef _INITIALIZER_LIST 31 | #define _INITIALIZER_LIST 32 | 33 | #if __cplusplus >= 201103L 34 | 35 | #pragma GCC system_header 36 | 37 | #pragma GCC visibility push(default) 38 | 39 | //#include 40 | 41 | namespace std 42 | { 43 | /// initializer_list 44 | template 45 | class initializer_list 46 | { 47 | public: 48 | typedef _E value_type; 49 | typedef const _E& reference; 50 | typedef const _E& const_reference; 51 | typedef size_t size_type; 52 | typedef const _E* iterator; 53 | typedef const _E* const_iterator; 54 | 55 | private: 56 | iterator _M_array; 57 | size_type _M_len; 58 | 59 | // The compiler can call a private constructor. 60 | constexpr initializer_list(const_iterator __a, size_type __l) 61 | : _M_array(__a), _M_len(__l) { } 62 | 63 | public: 64 | constexpr initializer_list() noexcept 65 | : _M_array(0), _M_len(0) { } 66 | 67 | // Number of elements. 68 | constexpr size_type 69 | size() const noexcept { return _M_len; } 70 | 71 | // First element. 72 | constexpr const_iterator 73 | begin() const noexcept { return _M_array; } 74 | 75 | // One past the last element. 76 | constexpr const_iterator 77 | end() const noexcept { return begin() + size(); } 78 | }; 79 | 80 | /** 81 | * @brief Return an iterator pointing to the first element of 82 | * the initilizer_list. 83 | * @param __ils Initializer list. 84 | */ 85 | template 86 | constexpr const _Tp* 87 | begin(initializer_list<_Tp> __ils) noexcept 88 | { return __ils.begin(); } 89 | 90 | /** 91 | * @brief Return an iterator pointing to one past the last element 92 | * of the initilizer_list. 93 | * @param __ils Initializer list. 94 | */ 95 | template 96 | constexpr const _Tp* 97 | end(initializer_list<_Tp> __ils) noexcept 98 | { return __ils.end(); } 99 | } 100 | 101 | #pragma GCC visibility pop 102 | 103 | #endif // __cplusplus >= 201103L 104 | #endif // _INITIALIZER_LIST 105 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/iomanip.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/iostream: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #ifndef __HEADER_STD_IOSTREAM 23 | #define __HEADER_STD_IOSTREAM 1 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #ifdef ARDUINO 30 | #include 31 | #else 32 | #include 33 | #endif 34 | #include 35 | 36 | #pragma GCC visibility push(default) 37 | 38 | namespace std{ 39 | #ifdef ARDUINO 40 | 41 | #ifdef __UCLIBCXX_SUPPORT_COUT__ 42 | extern ohserialstream cout; 43 | #endif 44 | #ifdef __UCLIBCXX_SUPPORT_CIN__ 45 | extern ihserialstream cin; 46 | #endif 47 | #ifdef __UCLIBCXX_SUPPORT_CERR__ 48 | extern ohserialstream cerr; 49 | #endif 50 | #ifdef __UCLIBCXX_SUPPORT_CLOG__ 51 | extern ohserialstream clog; 52 | #endif 53 | 54 | #else // ARDUINO 55 | 56 | #ifdef __UCLIBCXX_SUPPORT_CIN__ 57 | extern istream cin; 58 | #endif 59 | #ifdef __UCLIBCXX_SUPPORT_COUT__ 60 | extern ostream cout; 61 | #endif 62 | #ifdef __UCLIBCXX_SUPPORT_CERR__ 63 | extern ostream cerr; 64 | #endif 65 | #ifdef __UCLIBCXX_SUPPORT_CLOG__ 66 | extern ostream clog; 67 | #endif 68 | #ifdef __UCLIBCXX_SUPPORT_WCIN__ 69 | extern wistream wcin; 70 | #endif 71 | #ifdef __UCLIBCXX_SUPPORT_WCOUT__ 72 | extern wostream wcout; 73 | #endif 74 | #ifdef __UCLIBCXX_SUPPORT_WCERR__ 75 | extern wostream wcerr; 76 | #endif 77 | #ifdef __UCLIBCXX_SUPPORT_WCLOG__ 78 | extern wostream wclog; 79 | #endif 80 | 81 | #endif // not ARDUINO 82 | 83 | template class _UCXXEXPORT basic_iostream : 84 | public basic_istream, public basic_ostream 85 | { 86 | public: 87 | // constructor/destructor 88 | explicit _UCXXEXPORT basic_iostream(basic_streambuf* sb); 89 | virtual _UCXXEXPORT ~basic_iostream(); //Below 90 | }; 91 | 92 | template _UCXXEXPORT 93 | basic_iostream:: basic_iostream(basic_streambuf* sb) 94 | : basic_ios(sb), basic_istream(sb), basic_ostream(sb) 95 | { 96 | return; 97 | } 98 | 99 | 100 | template _UCXXEXPORT basic_iostream::~basic_iostream(){ 101 | return; 102 | } 103 | 104 | 105 | #ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 106 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 107 | #ifndef __UCLIBCXX_COMPILE_IOSTREAM__ 108 | 109 | template <> _UCXXEXPORT basic_iostream >:: 110 | basic_iostream(basic_streambuf >* sb); 111 | template <> _UCXXEXPORT basic_iostream >::~basic_iostream(); 112 | 113 | #endif 114 | #endif 115 | #endif 116 | 117 | 118 | 119 | } 120 | 121 | #pragma GCC visibility pop 122 | 123 | #endif 124 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/iostream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #define __UCLIBCXX_COMPILE_IOSTREAM__ 1 21 | 22 | #include 23 | 24 | namespace std{ 25 | 26 | #ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 27 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 28 | 29 | template _UCXXEXPORT basic_iostream >:: 30 | basic_iostream(basic_streambuf >* sb); 31 | template _UCXXEXPORT basic_iostream >::~basic_iostream(); 32 | 33 | #endif 34 | #endif 35 | 36 | } 37 | 38 | 39 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/istream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | 19 | */ 20 | 21 | #define __UCLIBCXX_COMPILE_ISTREAM__ 1 22 | 23 | #include 24 | 25 | 26 | namespace std{ 27 | 28 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 29 | 30 | template <> _UCXXEXPORT string _readToken >(istream & stream) 31 | { 32 | string temp; 33 | char_traits::int_type c; 34 | while(true){ 35 | c = stream.rdbuf()->sgetc(); 36 | if(c != char_traits::eof() && isspace(c) == false){ 37 | stream.rdbuf()->sbumpc(); 38 | temp.append(1, char_traits::to_char_type(c)); 39 | }else{ 40 | break; 41 | } 42 | } 43 | if (temp.size() == 0) 44 | stream.setstate(ios_base::eofbit|ios_base::failbit); 45 | 46 | return temp; 47 | } 48 | 49 | template _UCXXEXPORT istream::int_type istream::get(); 50 | template _UCXXEXPORT istream & istream::get(char &c); 51 | 52 | template _UCXXEXPORT istream & istream::operator>>(bool &n); 53 | template _UCXXEXPORT istream & istream::operator>>(short &n); 54 | template _UCXXEXPORT istream & istream::operator>>(unsigned short &n); 55 | template _UCXXEXPORT istream & istream::operator>>(int &n); 56 | template _UCXXEXPORT istream & istream::operator>>(unsigned int &n); 57 | template _UCXXEXPORT istream & istream::operator>>(long unsigned &n); 58 | template _UCXXEXPORT istream & istream::operator>>(long int &n); 59 | template _UCXXEXPORT istream & istream::operator>>(void *& p); 60 | template _UCXXEXPORT istream & operator>>(istream & is, char & c); 61 | 62 | 63 | #ifdef __UCLIBCXX_HAS_FLOATS__ 64 | template _UCXXEXPORT istream & istream::operator>>(float &f); 65 | template _UCXXEXPORT istream & istream::operator>>(double &f); 66 | template _UCXXEXPORT istream & istream::operator>>(long double &f); 67 | #endif 68 | 69 | template _UCXXEXPORT void __skipws(basic_istream >& is); 70 | 71 | #endif 72 | 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/iterator.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/limits.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/list.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/locale: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef __HEADER_STD_LOCALE 25 | #define __HEADER_STD_LOCALE 1 26 | 27 | #pragma GCC visibility push(default) 28 | 29 | namespace std{ 30 | class _UCXXEXPORT locale { 31 | public: 32 | // types: 33 | class facet; 34 | class id; 35 | typedef unsigned char category; 36 | 37 | static const category 38 | none = 0, 39 | collate = 0x01, ctype = 0x02, 40 | monetary = 0x04, numeric = 0x08, 41 | time = 0x10, messages = 0x20, 42 | all = collate | ctype | monetary | numeric | time | messages; 43 | 44 | // construct/copy/destroy: 45 | locale() throw(){ 46 | return; 47 | } 48 | locale(const locale& other) throw(){ 49 | (void)other; 50 | return; 51 | } 52 | locale(const char *) throw(){ 53 | return; 54 | } 55 | ~locale() throw(){ 56 | return; 57 | } 58 | 59 | const locale& operator=(const locale&) throw(){ 60 | return *this; 61 | } 62 | std::string name() const { return "C"; } 63 | }; 64 | 65 | class _UCXXEXPORT locale::facet { 66 | friend class locale; 67 | explicit facet(size_t = 0){ 68 | return; 69 | } 70 | virtual ~facet(){ 71 | return; 72 | } 73 | }; 74 | 75 | class _UCXXEXPORT locale::id { 76 | id(){ } 77 | }; 78 | 79 | } 80 | 81 | #pragma GCC visibility pop 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/locale.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | 26 | namespace std{ 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/map.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef __STD_NEW_OPERATOR 25 | #define __STD_NEW_OPERATOR 1 26 | 27 | #pragma GCC visibility push(default) 28 | 29 | namespace std{ 30 | class _UCXXEXPORT bad_alloc : public exception {}; 31 | 32 | struct _UCXXEXPORT nothrow_t {}; 33 | extern const nothrow_t nothrow; 34 | 35 | typedef void (*new_handler)(); 36 | _UCXXEXPORT new_handler set_new_handler(new_handler new_p) throw(); 37 | } 38 | 39 | 40 | _UCXXEXPORT void* operator new(std::size_t numBytes) throw(std::bad_alloc); 41 | _UCXXEXPORT void operator delete(void* ptr) throw(); 42 | 43 | _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc); 44 | _UCXXEXPORT void operator delete[](void * ptr) throw(); 45 | 46 | #ifndef NO_NOTHROW 47 | _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(); 48 | _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw(); 49 | 50 | _UCXXEXPORT void* operator new[](std::size_t numBytes, const std::nothrow_t& ) throw(); 51 | _UCXXEXPORT void operator delete[](void* ptr, const std::nothrow_t& ) throw(); 52 | #endif 53 | 54 | /* Placement operators */ 55 | inline void* operator new(std::size_t, void* ptr) throw() {return ptr; } 56 | inline void operator delete(void* , void *) throw() { } 57 | 58 | inline void* operator new[](std::size_t, void *p) throw() { return p; } 59 | inline void operator delete[](void* , void *) throw() {} 60 | 61 | #pragma GCC visibility pop 62 | 63 | #endif 64 | 65 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new_handler.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | const std::nothrow_t std::nothrow = { }; 23 | 24 | //Name selected to be compatable with g++ code 25 | std::new_handler __new_handler; 26 | 27 | _UCXXEXPORT std::new_handler std::set_new_handler(std::new_handler new_p) throw(){ 28 | std::new_handler retval = __new_handler; 29 | __new_handler = new_p; 30 | return retval; 31 | } 32 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new_op.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | // Arduino 1.0 contains an implementation for this. 21 | #if ARDUINO < 100 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | _UCXXEXPORT void* operator new(std::size_t numBytes) throw(std::bad_alloc){ 28 | //C++ stardard 5.3.4.8 requires that a valid pointer be returned for 29 | //a call to new(0). Thus: 30 | if(numBytes == 0){ 31 | numBytes = 1; 32 | } 33 | void * p = malloc(numBytes); 34 | if(p == 0){ 35 | std::__throw_bad_alloc(); 36 | } 37 | return p; 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new_opnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(){ 26 | return malloc(numBytes); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new_opv.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | 25 | // Arduino now defines this 26 | #if 0 27 | _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ 28 | //C++ stardard 5.3.4.8 requires that a valid pointer be returned for 29 | //a call to new(0). Thus: 30 | if(numBytes == 0){ 31 | numBytes = 1; 32 | } 33 | void * p = malloc(numBytes); 34 | if(p == 0){ 35 | std::__throw_bad_alloc(); 36 | } 37 | return p; 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/new_opvnt.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef NO_NOTHROW 25 | _UCXXEXPORT void* operator new[](std::size_t numBytes, const std::nothrow_t& ) throw(){ 26 | return malloc(numBytes); 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/numeric.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/ostream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #define __UCLIBCXX_COMPILE_OSTREAM__ 1 21 | 22 | #include 23 | 24 | namespace std{ 25 | 26 | 27 | #ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 28 | 29 | #ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 30 | template _UCXXEXPORT ostream::~basic_ostream(); 31 | #endif //__UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 32 | 33 | template _UCXXEXPORT ostream & ostream::flush(); 34 | 35 | template _UCXXEXPORT ostream & ostream::operator<<(bool n); 36 | template _UCXXEXPORT ostream & ostream::operator<<(short int n); 37 | template _UCXXEXPORT ostream & ostream::operator<<(unsigned short int n); 38 | template _UCXXEXPORT ostream & ostream::operator<<(int n); 39 | template _UCXXEXPORT ostream & ostream::operator<<(unsigned int n); 40 | template _UCXXEXPORT ostream & ostream::operator<<(long n); 41 | template _UCXXEXPORT ostream & ostream::operator<<(unsigned long n); 42 | template _UCXXEXPORT ostream & ostream::operator<<(float f); 43 | template _UCXXEXPORT ostream & ostream::operator<<(double f); 44 | template _UCXXEXPORT ostream & ostream::operator<<(long double f); 45 | template _UCXXEXPORT ostream & ostream::operator<<(void* p); 46 | template _UCXXEXPORT ostream & ostream::operator<<(basic_streambuf >* sb); 47 | 48 | #ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 49 | 50 | template _UCXXEXPORT ostream::sentry::sentry(ostream & os); 51 | template _UCXXEXPORT ostream::sentry::~sentry(); 52 | 53 | #endif //__UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 54 | 55 | template _UCXXEXPORT ostream & endl(ostream & os); 56 | template _UCXXEXPORT ostream & flush(ostream & os); 57 | template _UCXXEXPORT ostream & operator<<(ostream & out, char c); 58 | template _UCXXEXPORT ostream & operator<<(ostream & out, const char* c); 59 | template _UCXXEXPORT ostream & operator<<(ostream & out, unsigned char c); 60 | template _UCXXEXPORT ostream & operator<<(ostream & out, const unsigned char* c); 61 | 62 | #endif 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/queue.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/set.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/sstream.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #define __UCLIBCXX_COMPILE_SSTREAM__ 1 21 | 22 | #include 23 | 24 | namespace std{ 25 | 26 | #ifdef __UCLIBCXX_EXPAND_SSTREAM_CHAR__ 27 | 28 | typedef char_traits tr_ch; 29 | typedef basic_stringbuf > char_stringbuf; 30 | 31 | #ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 32 | 33 | template _UCXXEXPORT char_stringbuf::basic_stringbuf(ios_base::openmode which); 34 | template _UCXXEXPORT char_stringbuf::~basic_stringbuf(); 35 | 36 | #endif //__UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 37 | 38 | template _UCXXEXPORT basic_string, allocator > char_stringbuf::str() const; 39 | template _UCXXEXPORT char_stringbuf::int_type char_stringbuf::pbackfail(char_stringbuf::int_type c); 40 | template _UCXXEXPORT char_stringbuf::int_type char_stringbuf::overflow(char_stringbuf::int_type c); 41 | template _UCXXEXPORT char_stringbuf::pos_type 42 | char_stringbuf::seekoff(char_stringbuf::off_type, ios_base::seekdir, ios_base::openmode); 43 | template _UCXXEXPORT char_stringbuf::int_type char_stringbuf::underflow (); 44 | template _UCXXEXPORT streamsize char_stringbuf::xsputn(const char* s, streamsize n); 45 | 46 | #ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 47 | 48 | template _UCXXEXPORT basic_stringstream >::basic_stringstream(ios_base::openmode which); 49 | template _UCXXEXPORT basic_istringstream >::~basic_istringstream(); 50 | template _UCXXEXPORT basic_ostringstream >::~basic_ostringstream(); 51 | template _UCXXEXPORT basic_stringstream >::~basic_stringstream(); 52 | 53 | #endif //__UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 54 | 55 | #endif 56 | 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/stack: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Lesser General Public 5 | License as published by the Free Software Foundation; either 6 | version 2.1 of the License, or (at your option) any later version. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public 14 | License along with this library; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | #ifndef __HEADER_STD_STACK 22 | #define __HEADER_STD_STACK 1 23 | 24 | #pragma GCC visibility push(default) 25 | 26 | namespace std{ 27 | 28 | template > class _UCXXEXPORT stack{ 29 | protected: 30 | Container c; 31 | 32 | public: 33 | typedef typename Container::value_type value_type; 34 | typedef typename Container::size_type size_type; 35 | typedef Container container_type; 36 | 37 | explicit stack(const Container& a = Container()) : c(a) { }; 38 | bool empty() const { return c.empty(); } 39 | size_type size() const { return c.size(); } 40 | value_type& top() { return c.back(); } 41 | const value_type& top() const { return c.back(); } 42 | void push(const value_type& x) { c.push_back(x); } 43 | void pop() { c.pop_back(); } 44 | 45 | bool operator==(const stack &x) const{ 46 | return x.c == c; 47 | } 48 | 49 | }; 50 | 51 | 52 | template _UCXXEXPORT bool 53 | operator< (const stack& x, const stack& y) 54 | { 55 | return (x.c < y.c); 56 | } 57 | template _UCXXEXPORT bool 58 | operator!=(const stack& x, const stack& y) 59 | { 60 | return (x.c != y.c); 61 | } 62 | template _UCXXEXPORT bool 63 | operator> (const stack& x, const stack& y) 64 | { 65 | return (x.c > y.c); 66 | } 67 | template _UCXXEXPORT bool 68 | operator>=(const stack& x, const stack& y) 69 | { 70 | return (x.c >= y.c); 71 | } 72 | template _UCXXEXPORT bool 73 | operator<=(const stack& x, const stack& y) 74 | { 75 | return (x.c <= y.c); 76 | } 77 | 78 | } 79 | 80 | #pragma GCC visibility pop 81 | 82 | #endif 83 | 84 | 85 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/stack.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/stdexcept: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifndef HEADER_STD_EXCEPTIONS 25 | #define HEADER_STD_EXCEPTIONS 1 26 | 27 | //Don't include support if not needed 28 | #ifdef __UCLIBCXX_EXCEPTION_SUPPORT__ 29 | 30 | #pragma GCC visibility push(default) 31 | 32 | namespace std{ 33 | 34 | //typedef basic_string string; 35 | 36 | class _UCXXEXPORT logic_error : public exception { 37 | protected: 38 | string mstring; 39 | public: 40 | logic_error() throw(); 41 | logic_error(const string& what_arg); 42 | 43 | virtual ~logic_error() throw() {} 44 | virtual const char * what() const throw(); 45 | 46 | }; 47 | 48 | class _UCXXEXPORT domain_error : public logic_error { 49 | public: 50 | domain_error() : logic_error() {} 51 | domain_error(const string& what_arg) : logic_error(what_arg) {} 52 | virtual ~domain_error() throw() {} 53 | }; 54 | 55 | class _UCXXEXPORT invalid_argument : public logic_error { 56 | public: 57 | invalid_argument() : logic_error(){} 58 | invalid_argument(const string& what_arg) : logic_error(what_arg){} 59 | virtual ~invalid_argument() throw() {} 60 | }; 61 | 62 | class _UCXXEXPORT length_error : public logic_error { 63 | public: 64 | length_error() : logic_error(){} 65 | length_error(const string& what_arg) : logic_error(what_arg){} 66 | virtual ~length_error() throw() {} 67 | }; 68 | 69 | class _UCXXEXPORT out_of_range : public logic_error{ 70 | public: 71 | out_of_range(); 72 | out_of_range(const string & what_arg); 73 | virtual ~out_of_range() throw() {} 74 | 75 | }; 76 | 77 | class _UCXXEXPORT runtime_error : public exception{ 78 | protected: 79 | string mstring; 80 | public: 81 | runtime_error(); 82 | runtime_error(const string& what_arg); 83 | 84 | virtual ~runtime_error() throw() {} 85 | virtual const char * what() const throw(); 86 | }; 87 | 88 | class _UCXXEXPORT range_error : public runtime_error{ 89 | public: 90 | range_error() : runtime_error(){} 91 | range_error(const string& what_arg) : runtime_error(what_arg) {} 92 | virtual ~range_error() throw(){ } 93 | }; 94 | 95 | 96 | class _UCXXEXPORT overflow_error : public runtime_error{ 97 | public: 98 | overflow_error() : runtime_error(){} 99 | overflow_error(const string& what_arg) : runtime_error(what_arg) {} 100 | virtual ~overflow_error() throw(){} 101 | }; 102 | 103 | class _UCXXEXPORT underflow_error : public runtime_error{ 104 | public: 105 | underflow_error() : runtime_error(){} 106 | underflow_error(const string& what_arg) : runtime_error(what_arg) {} 107 | virtual ~underflow_error() throw(){} 108 | }; 109 | 110 | 111 | 112 | } 113 | 114 | #pragma GCC visibility pop 115 | 116 | #endif 117 | #endif 118 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/stdexcept.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | #ifdef __UCLIBCXX_EXCEPTION_SUPPORT__ 24 | 25 | namespace std{ 26 | 27 | _UCXXEXPORT logic_error::logic_error() throw() : mstring(){ 28 | 29 | } 30 | 31 | _UCXXEXPORT logic_error::logic_error(const string& what_arg) : mstring(what_arg){ 32 | 33 | } 34 | 35 | _UCXXEXPORT const char * logic_error::what() const throw(){ 36 | return mstring.c_str(); 37 | } 38 | 39 | 40 | _UCXXEXPORT out_of_range::out_of_range() : logic_error(){ 41 | 42 | } 43 | 44 | _UCXXEXPORT out_of_range::out_of_range(const string & what_arg) : logic_error(what_arg) { 45 | 46 | } 47 | 48 | _UCXXEXPORT runtime_error::runtime_error() : mstring(){ 49 | 50 | } 51 | 52 | _UCXXEXPORT runtime_error::runtime_error(const string& what_arg) : mstring(what_arg){ 53 | 54 | } 55 | 56 | _UCXXEXPORT const char * runtime_error::what() const throw(){ 57 | return mstring.c_str(); 58 | } 59 | 60 | } 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/streambuf.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #define __UCLIBCXX_COMPILE_STREAMBUF__ 1 21 | 22 | #include 23 | 24 | namespace std{ 25 | 26 | #ifdef __UCLIBCXX_EXPAND_STREAMBUF_CHAR__ 27 | 28 | #ifdef __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 29 | 30 | template _UCXXEXPORT streambuf::basic_streambuf(); 31 | template _UCXXEXPORT streambuf::~basic_streambuf(); 32 | 33 | #endif 34 | 35 | template _UCXXEXPORT locale streambuf::pubimbue(const locale &loc); 36 | template _UCXXEXPORT streamsize streambuf::in_avail(); 37 | template _UCXXEXPORT streambuf::int_type streambuf::sbumpc(); 38 | template _UCXXEXPORT streambuf::int_type streambuf::snextc(); 39 | template _UCXXEXPORT streambuf::int_type streambuf::sgetc(); 40 | template _UCXXEXPORT streambuf::int_type streambuf::sputbackc(char_type c); 41 | template _UCXXEXPORT streambuf::int_type streambuf::sungetc(); 42 | template _UCXXEXPORT streambuf::int_type streambuf::sputc(char_type c); 43 | 44 | #endif 45 | 46 | 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/string_iostream: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #ifdef __UCLIBCXX_HAS_WCHAR__ 25 | #include 26 | #include 27 | #endif 28 | 29 | #ifndef __HEADER_STD_STRING_IOSTREAM 30 | #define __HEADER_STD_STRING_IOSTREAM 1 31 | 32 | #pragma GCC visibility push(default) 33 | 34 | namespace std{ 35 | 36 | 37 | 38 | template _UCXXEXPORT basic_ostream& 39 | operator<<(basic_ostream& os, const basic_string& str) 40 | { 41 | return os.write(str.data(), str.length()); 42 | } 43 | 44 | template _UCXXEXPORT basic_istream& 45 | operator>>(basic_istream& is, basic_string& str) 46 | { 47 | 48 | typename basic_istream::sentry s(is); 49 | if(s == false){ 50 | return is; 51 | } 52 | 53 | str.clear(); 54 | 55 | typename basic_istream::int_type c; 56 | typename Allocator::size_type n = is.width(); 57 | bool exitnow = false; 58 | if(n == 0){ 59 | n = str.max_size(); 60 | } 61 | 62 | // //Clear out preliminary spaces first 63 | // c = is.get(); 64 | // while(isspace(c)){ 65 | // c = is.get(); 66 | // } 67 | // 68 | // is.putback(c); 69 | 70 | do{ 71 | c = is.get(); 72 | if(c == traits::eof() || isspace(c) || n == 0){ 73 | is.putback(c); 74 | exitnow = true; 75 | }else{ 76 | str.append(1, traits::to_char_type(c) ); 77 | --n; 78 | } 79 | }while(exitnow == false); 80 | return is; 81 | } 82 | 83 | template _UCXXEXPORT basic_istream& 84 | getline(basic_istream& is, basic_string& str, charT delim) 85 | { 86 | typename basic_istream::sentry s(is); 87 | if(s == false){ 88 | return is; 89 | } 90 | 91 | str.erase(); 92 | 93 | streamsize i = 0; 94 | typename basic_istream::int_type c_i; 95 | charT c; 96 | unsigned int n = str.max_size(); 97 | for(i=0;i _UCXXEXPORT basic_istream& 112 | getline(basic_istream& is, basic_string& str) 113 | { 114 | return getline(is, str, '\n'); 115 | } 116 | 117 | 118 | #ifdef __UCLIBCXX_EXPAND_STRING_CHAR__ 119 | #ifndef __UCLIBCXX_COMPILE_STRING__ 120 | 121 | 122 | #ifdef __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 123 | template<> _UCXXEXPORT basic_istream >& operator>>( 124 | basic_istream >& is, 125 | basic_string, allocator >& str); 126 | #endif 127 | 128 | 129 | #ifdef __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 130 | template<> _UCXXEXPORT basic_ostream >& 131 | operator<<(basic_ostream >& os, 132 | const basic_string, std::allocator >& str); 133 | 134 | #endif 135 | 136 | 137 | #endif 138 | #endif 139 | 140 | 141 | } 142 | 143 | #pragma GCC visibility pop 144 | 145 | #endif 146 | 147 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/support.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | #if 0 23 | extern "C" void *__cxa_allocate_exception(size_t thrown_size){ 24 | void * retval; 25 | 26 | /*The amount of data needed is the size of the object *PLUS* 27 | the size of the header. The header is of struct __cxa_exception 28 | The address needs to be adjusted because the pointer we return 29 | should not point to the start of the memory, but to the point 30 | where the object being thrown actually starts*/ 31 | 32 | retval = malloc(thrown_size + sizeof(__cxa_exception)); 33 | 34 | // Check to see that we actuall allocated memory 35 | if(retval == 0){ 36 | std::terminate(); 37 | } 38 | 39 | //Need to do a typecast to char* otherwize we are doing math with 40 | //a void* which makes the compiler cranky (Like me) 41 | return ((char *)retval + sizeof(__cxa_exception)); 42 | } 43 | 44 | extern "C" void __cxa_free_exception(void *thrown_exception){ 45 | 46 | 47 | 48 | } 49 | 50 | extern "C" void __cxa_throw (void *thrown_exception, std::type_info *tinfo,void (*dest) (void *) ){ 51 | 52 | 53 | } 54 | #endif // 0 55 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/system_configuration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Automatically generated C config: don't edit 3 | */ 4 | /* 5 | * Version Number 6 | */ 7 | #define __UCLIBCXX_MAJOR__ 0 8 | #define __UCLIBCXX_MINOR__ 2 9 | #define __UCLIBCXX_SUBLEVEL__ 3 10 | 11 | /* 12 | * Target Features and Options 13 | */ 14 | #define __UCLIBCXX_HAS_FLOATS__ 15 | #undef __UCLIBCXX_HAS_TLS__ 16 | #define __WARNINGS__ "-Wall" 17 | #define __BUILD_EXTRA_LIBRARIES__ "" 18 | #define __HAVE_DOT_CONFIG__ 1 19 | 20 | /* 21 | * String and I/O Stream Support 22 | */ 23 | #undef __UCLIBCXX_HAS_WCHAR__ 24 | #define __UCLIBCXX_IOSTREAM_BUFSIZE__ 32 25 | #undef __UCLIBCXX_HAS_LFS__ 26 | #undef __UCLIBCXX_SUPPORT_CDIR__ 27 | #define __UCLIBCXX_SUPPORT_COUT__ 28 | #define __UCLIBCXX_SUPPORT_CERR__ 29 | /* 30 | * STL and Code Expansion 31 | */ 32 | //#define __UCLIBCXX_STL_BUFFER_SIZE__ 32 33 | #define __UCLIBCXX_STL_BUFFER_SIZE__ 8 34 | #undef __UCLIBCXX_CODE_EXPANSION__ 35 | 36 | /* 37 | * Library Installation Options 38 | */ 39 | #define __UCLIBCXX_RUNTIME_PREFIX__ "/usr/uClibc++" 40 | #define __UCLIBCXX_RUNTIME_INCLUDE_SUBDIR__ "/include" 41 | #define __UCLIBCXX_RUNTIME_LIB_SUBDIR__ "/lib" 42 | #define __UCLIBCXX_RUNTIME_BIN_SUBDIR__ "/bin" 43 | #undef __UCLIBCXX_EXCEPTION_SUPPORT__ 44 | #define __BUILD_STATIC_LIB__ 1 45 | #define __BUILD_ONLY_STATIC_LIB__ 1 46 | #undef __DODEBUG__ 47 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/type_traits: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2005 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #ifndef __HEADER_TYPE_TRAITS 26 | #define __HEADER_TYPE_TRAITS 1 27 | 28 | #pragma GCC visibility push(default) 29 | 30 | namespace std{ 31 | 32 | struct _UCXXEXPORT __true_type{}; 33 | struct _UCXXEXPORT __false_type{}; 34 | 35 | template class _UCXXEXPORT __is_integer{ 36 | public: 37 | typedef __false_type value; 38 | }; 39 | 40 | template <> class _UCXXEXPORT __is_integer { 41 | public: 42 | typedef __true_type value; 43 | }; 44 | 45 | template <> class _UCXXEXPORT __is_integer { 46 | public: 47 | typedef __true_type value; 48 | }; 49 | 50 | template <> class _UCXXEXPORT __is_integer { 51 | public: 52 | typedef __true_type value; 53 | }; 54 | 55 | template <> class _UCXXEXPORT __is_integer { 56 | public: 57 | typedef __true_type value; 58 | }; 59 | 60 | template <> class _UCXXEXPORT __is_integer { 61 | public: 62 | typedef __true_type value; 63 | }; 64 | 65 | template <> class _UCXXEXPORT __is_integer { 66 | public: 67 | typedef __true_type value; 68 | }; 69 | 70 | template <> class _UCXXEXPORT __is_integer { 71 | public: 72 | typedef __true_type value; 73 | }; 74 | 75 | template <> class _UCXXEXPORT __is_integer { 76 | public: 77 | typedef __true_type value; 78 | }; 79 | 80 | template <> class _UCXXEXPORT __is_integer { 81 | public: 82 | typedef __true_type value; 83 | }; 84 | 85 | 86 | 87 | } 88 | 89 | #pragma GCC visibility pop 90 | 91 | #endif 92 | 93 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/typeinfo.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | _UCXXEXPORT bad_cast::~bad_cast() throw(){ 25 | 26 | } 27 | 28 | _UCXXEXPORT bad_typeid::~bad_typeid() throw(){ 29 | 30 | } 31 | 32 | } 33 | 34 | 35 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/uartbuf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/aq6s/StandardCpp/uartbuf -------------------------------------------------------------------------------- /aq6s/StandardCpp/utility.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | 21 | #include 22 | 23 | 24 | namespace std{ 25 | 26 | 27 | 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/utility.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | This file is part of the uClibc++ Library. 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 | 18 | */ 19 | 20 | 21 | #include 22 | 23 | 24 | #ifndef __STD_HEADER_UTILITY 25 | #define __STD_HEADER_UTILITY 1 26 | 27 | #pragma GCC visibility push(default) 28 | 29 | namespace std{ 30 | 31 | namespace rel_ops { 32 | template inline bool operator!=(const T& x, const T& y){ 33 | return !(x == y); 34 | } 35 | 36 | template inline bool operator> (const T& x, const T& y){ 37 | return ( y < x); 38 | } 39 | 40 | template inline bool operator<=(const T& x, const T& y){ 41 | return !( y < x ); 42 | } 43 | 44 | template inline bool operator>=(const T& x, const T& y){ 45 | return !(x < y); 46 | } 47 | } 48 | 49 | template struct _UCXXEXPORT pair { 50 | typedef T1 first_type; 51 | typedef T2 second_type; 52 | 53 | T1 first; 54 | T2 second; 55 | pair() : first(), second() { } 56 | pair(const T1& x, const T2& y) : first(x), second(y) { } 57 | template pair(const pair &p) : first(p.first), second(p.second) { } 58 | }; 59 | 60 | template bool operator==(const pair& x, const pair& y){ 61 | using namespace rel_ops; 62 | return (x.first == y.first && x.second==y.second); 63 | } 64 | template bool operator< (const pair& x, const pair& y){ 65 | return x.first < y.first || (!(y.first < x.first) && x.second < y.second); 66 | } 67 | template bool operator!=(const pair& x, const pair& y){ 68 | return !(x == y); 69 | } 70 | template bool operator> (const pair& x, const pair& y){ 71 | return y < x; 72 | } 73 | template bool operator>=(const pair& x, const pair& y){ 74 | return !(x < y); 75 | } 76 | template bool operator<=(const pair& x, const pair& y){ 77 | return !(y < x); 78 | } 79 | template pair make_pair(const T1& x, const T2& y){ 80 | return pair(x, y); 81 | } 82 | 83 | 84 | } 85 | 86 | #pragma GCC visibility pop 87 | 88 | #endif //__STD_HEADER_UTILITY 89 | -------------------------------------------------------------------------------- /aq6s/StandardCpp/valarray.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Garrett A. Kajmowicz 2 | 3 | This file is part of the uClibc++ Library. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | */ 19 | 20 | #include 21 | 22 | namespace std{ 23 | 24 | 25 | 26 | 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /aq6s/outputs/2014-02-09 21.30.06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/aq6s/outputs/2014-02-09 21.30.06.jpg -------------------------------------------------------------------------------- /aq6s/outputs/2014-02-09.txt: -------------------------------------------------------------------------------- 1 | << ;;;;;;23.65;963.37;23.16;40.94;-1; 2 | << ;;;;;;23.63;963.44;23.20;42.18;-1; 3 | << 9/2/2014;20:23:52;49.62;N;6.07;E;23.64;963.40;23.22;41.82;-1; 4 | << 9/2/2014;20:23:58;49.62;N;6.07;E;23.62;963.41;23.20;41.33;-1; 5 | << 9/2/2014;20:24:0;49.62;N;6.07;E;23.61;963.45;23.20;41.04;-1; 6 | << 9/2/2014;20:24:4;49.62;N;6.07;E;23.61;963.48;23.20;40.75;-1; 7 | << 9/2/2014;20:24:8;49.62;N;6.07;E;23.62;963.43;23.23;40.65;-1; 8 | << 9/2/2014;20:24:11;49.62;N;6.07;E;23.65;963.41;23.23;40.65;-1; 9 | << 9/2/2014;20:24:14;49.62;N;6.07;E;23.62;963.45;23.24;40.62;-1; 10 | << 9/2/2014;20:24:16;49.62;N;6.07;E;23.63;963.41;23.29;42.12;-1; 11 | << 9/2/2014;20:24:20;49.62;N;6.07;E;23.62;963.42;23.31;42.58;-1; 12 | << 9/2/2014;20:24:23;49.62;N;6.07;E;23.63;963.44;23.31;42.90;-1; 13 | << 9/2/2014;20:24:26;49.62;N;6.07;E;23.63;963.41;23.30;42.06;-1; 14 | << 9/2/2014;20:24:28;49.62;N;6.07;E;23.65;963.41;23.31;41.38;-1; 15 | << 9/2/2014;20:24:32;49.62;N;6.07;E;23.63;963.43;23.30;40.95;-1; 16 | << 9/2/2014;20:24:35;49.62;N;6.07;E;23.63;963.42;23.28;40.72;-1; 17 | << 9/2/2014;20:24:38;49.62;N;6.07;E;23.63;963.41;23.26;40.62;-1; 18 | << 9/2/2014;20:24:40;49.62;N;6.07;E;23.62;963.44;23.24;40.55;-1; 19 | << 9/2/2014;20:24:44;49.62;N;6.07;E;23.61;963.35;23.20;40.55;-1; 20 | << 9/2/2014;20:24:47;49.62;N;6.07;E;23.60;963.41;23.21;40.62;-1; 21 | << 9/2/2014;20:24:50;49.62;N;6.07;E;23.61;963.49;23.22;41.07;-1; 22 | << 9/2/2014;20:24:52;49.62;N;6.07;E;23.61;963.46;23.23;41.08;-1; 23 | << 9/2/2014;20:24:56;49.62;N;6.07;E;23.61;963.40;23.21;40.98;-1; 24 | << 9/2/2014;20:25:0;49.62;N;6.07;E;23.61;963.42;23.20;40.84;-1; 25 | << 9/2/2014;20:25:3;49.62;N;6.07;E;23.61;963.40;23.18;40.74;-1; 26 | << 9/2/2014;20:25:6;49.62;N;6.07;E;23.61;963.36;23.16;40.74;-1; 27 | << 9/2/2014;20:25:8;49.62;N;6.07;E;23.60;963.37;23.14;40.64;-1; 28 | << 9/2/2014;20:25:12;49.62;N;6.07;E;23.61;963.39;23.12;40.67;-1; 29 | << 9/2/2014;20:25:15;49.62;N;6.07;E;23.61;963.34;23.10;40.67;-1; 30 | << 9/2/2014;20:25:18;49.62;N;6.07;E;23.61;963.40;23.08;40.73;-1; 31 | << 9/2/2014;20:25:20;49.62;N;6.07;E;23.61;963.41;23.04;40.79;-1; 32 | << 9/2/2014;20:25:24;49.62;N;6.07;E;23.61;963.41;22.99;40.85;-1; 33 | << 9/2/2014;20:25:28;49.62;N;6.07;E;23.61;963.33;22.97;40.92;-1; 34 | << 9/2/2014;20:25:32;49.62;N;6.07;E;23.61;963.42;22.94;40.91;-1; 35 | << 0/0/200;20:25:36;49.62;N;6.07;;23.60;963.49;22.94;40.98;-1; 36 | << 0/0/200;20:25:40;49.62;N;6.07;E;23.61;963.36;22.96;41.79;-1; 37 | << 0/0/200;20:25:43;49.62;N;6.07;E;23.62;963.35;22.97;42.57;-1; 38 | << 0/0/200;20:25:46;49.62;N;6.07;E;23.62;963.41;23.00;42.09;-1; 39 | << 0/0/200;20:25:48;49.62;N;6.07;E;23.62;963.43;22.99;41.70;-1; 40 | << 9/2/2014;20:25:52;49.62;N;6.07;E;23.62;963.43;22.98;41.31;-1; 41 | << 9/2/2014;20:25:55;49.62;N;6.07;E;23.61;963.39;23.00;41.08;-1; 42 | << 9/2/2014;20:25:58;49.62;N;6.07;E;23.62;963.50;23.01;40.99;-1; 43 | << 9/2/2014;20:26:0;49.62;N;6.07;E;23.62;963.41;23.05;41.93;-1; 44 | << 9/2/2014;20:26:4;49.62;N;6.07;E;23.63;963.50;23.06;43.13;-1; 45 | << 9/2/2014;20:26:7;49.62;N;6.07;E;23.63;963.42;23.10;43.66;-1; 46 | << 9/2/2014;20:26:10;49.62;N;6.07;E;23.63;963.40;23.10;44.04;-1; 47 | << 9/2/2014;20:26:12;49.62;N;6.07;E;23.63;963.37;23.12;44.53;-1; 48 | << 9/2/2014;20:26:16;49.62;N;6.07;E;23.64;963.34;23.14;44.89;-1; 49 | -------------------------------------------------------------------------------- /battery_holder/battery_holder.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/battery_holder/battery_holder.skp -------------------------------------------------------------------------------- /battery_holder/battery_holder_stretch.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/battery_holder/battery_holder_stretch.skp -------------------------------------------------------------------------------- /battery_holder/battery_holder_stretch~.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/battery_holder/battery_holder_stretch~.skp -------------------------------------------------------------------------------- /battery_holder/battery_holder~.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/battery_holder/battery_holder~.skp -------------------------------------------------------------------------------- /documentation/27904-Gas-Sensor-Modules-Guide-v2.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/27904-Gas-Sensor-Modules-Guide-v2.3.pdf -------------------------------------------------------------------------------- /documentation/27983-Gas-Sensor-Board-A-Schematic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/27983-Gas-Sensor-Board-A-Schematic.pdf -------------------------------------------------------------------------------- /documentation/Arduino-Fio-schematic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/Arduino-Fio-schematic.pdf -------------------------------------------------------------------------------- /documentation/MQ-7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/MQ-7.pdf -------------------------------------------------------------------------------- /documentation/Pololu 5V Step-Up-Step-Down Voltage Regulator S7V7F5.webloc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | URL 6 | http://www.pololu.com/product/2119 7 | 8 | 9 | -------------------------------------------------------------------------------- /documentation/Pololu 5V Step-UpStep-Down Voltage Regulator S7V7F5.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=Link to Pololu 5V Step-Up/Step-Down Voltage Regulator S7V7F5 4 | Type=Link 5 | URL=http://www.pololu.com/product/2119 6 | Icon=text-html 7 | -------------------------------------------------------------------------------- /documentation/S9014.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/S9014.pdf -------------------------------------------------------------------------------- /documentation/adafruit-ultimate-gps.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/adafruit-ultimate-gps.pdf -------------------------------------------------------------------------------- /documentation/gp2y1010au_e.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/documentation/gp2y1010au_e.pdf -------------------------------------------------------------------------------- /schematics/Eagle/External parts/Adafruit-Eagle-Library-master/README.md: -------------------------------------------------------------------------------- 1 | ## Adafruit Eagle Library 2 | 3 | Now in Eagle 6 format! 4 | 5 | ### Don't click on the files! 6 | 7 | [Click here](https://github.com/adafruit/Adafruit-Eagle-Library/zipball/master) 8 | to download this as a zip file. 9 | 10 | ### Installation 11 | 12 | 1. Open Eagle and select the `Control Panel` window. 13 | 2. Choose `Options` and from the drop down that appears, `Directories`. 14 | 3. Change the Libraries line from: `$EAGLEDIR/lbr` to something like: 15 | 16 | > $EAGLEDIR/lbr:$HOME/external_lbrs (for OS X) 17 | 18 | > $EAGLEDIR\lbr;$HOME\external_lbrs (for Windows) 19 | 20 | 4. Click `OK` to save your changes. 21 | 5. Eagle will prompt to create the directory if it does not already exist. Note 22 | the location and choose `Yes` to create the directory. 23 | 24 | > On OS X, `$HOME/external_lbrs` changes to: /Users/mosfet/external_lbrs/ 25 | 26 | > On Windows, `$HOME\external_lbrs` changes to: C:\Users\Mosfet\Documents\external_lbrs 27 | 28 | 6. Find and open the `external_lbrs` folder. Unzip and drag `adafruit.lbr` into the 29 | new `external_lbrs` folder. 30 | 7. Restart Eagle. The library should be now be usable. 31 | -------------------------------------------------------------------------------- /schematics/Eagle/External parts/Adafruit-Eagle-Library-master/README.txt: -------------------------------------------------------------------------------- 1 | ## Adafruit Eagle Library 2 | 3 | Now in Eagle 6 format! 4 | 5 | ### Don't click on the files! 6 | 7 | [Click here](https://github.com/adafruit/Adafruit-Eagle-Library/zipball/master) 8 | to download this as a zip file. 9 | 10 | ### Installation 11 | 12 | 1. Open Eagle and select the `Control Panel` window. 13 | 2. Choose `Options` and from the drop down that appears, `Directories`. 14 | 3. Change the Libraries line from: `$EAGLEDIR/lbr` to something like: 15 | 16 | > $EAGLEDIR/lbr:$HOME/external_lbrs (for OS X) 17 | 18 | > $EAGLEDIR\lbr;$HOME\external_lbrs (for Windows) 19 | 20 | 4. Click `OK` to save your changes. 21 | 5. Eagle will prompt to create the directory if it does not already exist. Note 22 | the location and choose `Yes` to create the directory. 23 | 24 | > On OS X, `$HOME/external_lbrs` changes to: /Users/mosfet/external_lbrs/ 25 | 26 | > On Windows, `$HOME\external_lbrs` changes to: C:\Users\Mosfet\Documents\external_lbrs 27 | 28 | 6. Find and open the `external_lbrs` folder. Unzip and drag `adafruit.lbr` into the 29 | new `external_lbrs` folder. 30 | 7. Restart Eagle. The library should be now be usable. 31 | -------------------------------------------------------------------------------- /schematics/Eagle/External parts/Adafruit-Ultimate-GPS-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/External parts/Adafruit-Ultimate-GPS-master.zip -------------------------------------------------------------------------------- /schematics/Eagle/External parts/microbuilderlibrary_v2/License.txt.txt: -------------------------------------------------------------------------------- 1 | This library was produced by microBuilder.eu and is placed in the public domain, subject to the following restrictions: 2 | 3 | THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 4 | -------------------------------------------------------------------------------- /schematics/Eagle/Screen Shot 2014-04-05 at 9.56.28 PM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/Screen Shot 2014-04-05 at 9.56.28 PM.png -------------------------------------------------------------------------------- /schematics/Eagle/air_quality_parts.l#8: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /schematics/Eagle/aq6.s#3: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /schematics/Eagle/aq6s/DESCRIPTION: -------------------------------------------------------------------------------- 1 |

Air quality six module sensor

2 | - GPS
3 | - Dust
4 | - Temp
5 | - Humidity
6 | - Carbon monoxide
7 | - Barometric pressure
-------------------------------------------------------------------------------- /schematics/Eagle/aq6s/pcb_design/both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/aq6s/pcb_design/both.png -------------------------------------------------------------------------------- /schematics/Eagle/aq6s/pcb_design/both.pxm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/aq6s/pcb_design/both.pxm -------------------------------------------------------------------------------- /schematics/Eagle/aq6s/pcb_design/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/aq6s/pcb_design/bottom.png -------------------------------------------------------------------------------- /schematics/Eagle/aq6s/pcb_design/export_dbl_sided.scr: -------------------------------------------------------------------------------- 1 | display all 2 | ratsnest 3 | display none 4 | display bottom pads vias 5 | export image bottom.png 6 | display none 7 | display top pads vias 8 | export image top.png 9 | -------------------------------------------------------------------------------- /schematics/Eagle/aq6s/pcb_design/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Eagle/aq6s/pcb_design/top.png -------------------------------------------------------------------------------- /schematics/Fritzing/aq6s.fzz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/aq6s.fzz -------------------------------------------------------------------------------- /schematics/Fritzing/aq6s_bb.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/aq6s_bb.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_copper_bottom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_copper_bottom.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_copper_bottom_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_copper_bottom_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_copper_top.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_copper_top.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_copper_top_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_copper_top_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_mask_bottom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_mask_bottom.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_mask_bottom_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_mask_bottom_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_mask_top.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_mask_top.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_mask_top_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_mask_top_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom.svg -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom_mirror.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_bottom_mirror.svg -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_top.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_top.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_top.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_top.svg -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_top_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_top_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_paste_mask_top_mirror.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_paste_mask_top_mirror.svg -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_silk_bottom.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_silk_bottom.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_silk_bottom_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_silk_bottom_mirror.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_silk_top.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_silk_top.pdf -------------------------------------------------------------------------------- /schematics/Fritzing/pcb/aq6s_etch_silk_top_mirror.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trefex/arduino-airquality/38ad90d7b0de389a800ddbbc97ecad79b271cb35/schematics/Fritzing/pcb/aq6s_etch_silk_top_mirror.pdf --------------------------------------------------------------------------------