text
stringlengths
1
24.5M
// // FILE: AnalogUVSensor.h // AUTHOR: Rob Tillaart // VERSION: 0.1.7 // DATE: 2021-09-25 // PURPOSE: Arduino library for an analogue UV sensor. // URL: https://github.com/RobTillaart/AnalogUVSensor #include "AnalogUVSensor.h" AnalogUVSensor::AnalogUVSensor() { // defaults from UNO. _analogPin = 14...
#pragma once // // FILE: AnalogUVSensor.h // AUTHOR: Rob Tillaart // VERSION: 0.1.7 // DATE: 2021-09-25 // PURPOSE: Arduino library for an analogue UV sensor. // URL: https://github.com/RobTillaart/AnalogUVSensor #include "Arduino.h" #define ANALOG_UVSENSOR_LIB_VERSION (F("0.1.7")) class AnalogUV...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2021-09-25 // PURPOSE: unit tests for an analogue UV sensor. // https://github.com/RobTillaart/AnalogUVSensor // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ----------------------...
// // FILE: Angle.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // PURPOSE: library for Angle math for Arduino // URL: https://github.com/RobTillaart/Angle // http://forum.arduino.cc/index.php?topic=339402 #include "Angle.h" AngleFormat::AngleFormat( const Angle &ref, AngleFormatMode format ) : ang...
#pragma once // // FILE: Angle.h // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // PURPOSE: angle library for Arduino // URL: https://github.com/RobTillaart/Angle // http://forum.arduino.cc/index.php?topic=339402 // // AngleFormat proxy added 03/03/15 by Christopher Andrews. #include "math.h" #include "Ar...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // VERSION: 0.1.0 // DATE: 2020-12-03 // PURPOSE: unit tests for the Angle library // https://github.com/RobTillaart/Angle // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ------------------...
#pragma once // // FILE: AngleConvertor.h // AUTHOR: Rob Tillaart // VERSION: 0.2.2 // DATE: 2022-12-01 // PURPOSE: Angle conversion class // URL: https://github.com/RobTillaart/AngleConvertor #include "Arduino.h" #define ANGLECONVERTOR_LIB_VERSION (F("0.2.2")) //////////////////////////////////...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // VERSION: 0.1.0 // DATE: 2022-12-03 // PURPOSE: unit tests for the Angle library // https://github.com/RobTillaart/AngleConvertor // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------...
// // FILE: ansi.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.4 // PURPOSE: Arduino library to send ANSI escape sequences // DATE: 2020-04-28 // URL: https://github.com/RobTillaart/ANSI #include "ansi.h" ANSI::ANSI(Stream * stream) { _stream = stream; } ////////////////////////////////////////////////...
#pragma once // // FILE: ansi.h // AUTHOR: Rob Tillaart // VERSION: 0.3.4 // PURPOSE: Arduino library to send ANSI escape sequences // DATE: 2020-04-28 // URL: https://github.com/RobTillaart/ANSI #include "Arduino.h" #define ANSI_LIB_VERSION (F("0.3.4")) class ANSI : public Stream { public: ANS...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-11 // PURPOSE: unit tests for the Arduino ANSI library // https://github.com/RobTillaart/ANSI // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- /...
// // FILE: APDS9900.cpp // AUTHOR: Rob Tillaart // DATE: 2024-12-09 // VERSION: 0.2.0 // PURPOSE: Arduino library for the APDS9900 environment sensor. // URL: https://github.com/RobTillaart/APDS9900 #include "APDS9900.h" // // REGISTERS // #define APDS9900_ENABLE 0x00 #define APDS9900_ATIME ...
#pragma once // FILE: APDS9900.h // AUTHOR: Rob Tillaart // VERSION: 0.2.0 // DATE: 2024-12-09 // PURPOSE: Arduino library for the APDS9900 environment sensor. // URL: https://github.com/RobTillaart/APDS9900 // // Read the datasheet for the details #include "Arduino.h" #include "Wire.h" #define APDS9900...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2025-01-05 // PURPOSE: unit tests for the APDS9900 library // URL: https://github.com/RobTillaart/APDS9900 // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // https://github.com/Arduino-CI/...
// // FILE: AS56000.cpp // AUTHOR: Rob Tillaart // VERSION: 0.6.6 // PURPOSE: Arduino library for AS5600 magnetic rotation meter // DATE: 2022-05-28 // URL: https://github.com/RobTillaart/AS5600 #include "AS5600.h" // CONFIGURATION REGISTERS const uint8_t AS5600_ZMCO = 0x00; const uint8_t AS5600_ZPOS = ...
#pragma once // // FILE: AS5600.h // AUTHOR: Rob Tillaart // VERSION: 0.6.6 // PURPOSE: Arduino library for AS5600 magnetic rotation meter // DATE: 2022-05-28 // URL: https://github.com/RobTillaart/AS5600 #include "Arduino.h" #include "Wire.h" #define AS5600_LIB_VERSION (F("0.6.6")) // de...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2022-05-28 // PURPOSE: unit tests for the AS5600 library // https://github.com/RobTillaart/AS5600 // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // as...
// // FILE: AS7331.cpp // AUTHOR: Rob Tillaart // DATE: 2025-08-28 // VERSION: 0.3.0 // PURPOSE: Arduino library for AS7331 UV sensor // URL: https://github.com/RobTillaart/AS7331 #include "AS7331.h" // REGISTERS CONFIGURATION MODE const uint8_t AS7331_REG_OSR = 0x00; const uint8_t AS7331_REG_AGEN ...
#pragma once // // FILE: AS7331.h // AUTHOR: Rob Tillaart // DATE: 2025-08-28 // VERSION: 0.3.0 // PURPOSE: Arduino library for AS7331 UV sensor // URL: https://github.com/RobTillaart/AS7331 // https://www.sparkfun.com/products/23517 // // SHEET: DS001047, v4.00, 2023-Mar-24 // #include "Arduino....
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2025-08-28 // PURPOSE: unit tests for the AS7331 library // URL: https://github.com/RobTillaart/AS7331 // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // https://github.com/Arduino-CI/ardu...
// // FILE: AsyncAnalog.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // DATE: 2018-09-05 // PURPOSE: Async version of analogRead, prevent blocking wait // URL: https://github.com/RobTillaart/AsyncAnalog #include "AsyncAnalog.h" #if defined(ARDUINO_ARCH_AVR) AsyncAnalog::AsyncAnalog(const uint8_t pin) {...
#pragma once // // FILE: AsyncAnalog.h // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // DATE: 2018-09-05 // PURPOSE: Async version of analogRead for AVR // URL: https://github.com/RobTillaart/AsyncAnalog #define ASYNCANALOG_LIB_VERSION (F("0.2.1")) #if defined(ARDUINO_ARCH_AVR) #include "Arduino.h" #...
#pragma once // // FILE: acids.h // AUTHOR: Rob Tillaart // DATE: 2025-07-10 // PURPOSE: short list of chemical formulae of acids / bases // URL: https://github.com/RobTillaart/AtomicWeight // // TODO // - extend // - grouping? // - example sketch // // ACID // #define ACETIC_ACID "CH3C...
// // FILE: AtomicWeight.cpp // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // VERSION: 0.3.3 // PURPOSE: Arduino library for atomic weights // URL: https://github.com/RobTillaart/AtomicWeight #include "AtomicWeight.h" #include "elements_uint16.h" PTOE::PTOE(const uint8_t size) { _size = size; _found =...
#pragma once // // FILE: AtomicWeight.h // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // VERSION: 0.3.3 // PURPOSE: Arduino library for atomic weights // URL: https://github.com/RobTillaart/AtomicWeight #include "Arduino.h" #define ATOMIC_WEIGHT_LIB_VERSION (F("0.3.3")) #ifndef ATOMIC_WEIGHT_MAX_...
#pragma once // // FILE: elements_float.h // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // PURPOSE: list of weights (float) // URL: https://github.com/RobTillaart/AtomicWeight ///////////////////////////////////////////////////////////////////////// // // float periodic table // struct element { char nam...
#pragma once // // FILE: elements_name.h // AUTHOR: Rob Tillaart // DATE: 2023-04-15 // PURPOSE: list of long names of elements. // pretty large table. // URL: https://github.com/RobTillaart/AtomicWeight char elements_name[119][14] = { "neutronium", "Hydrogen", "Helium", "Lithium", "Bery...
#pragma once // // FILE: elements_uint16.h // AUTHOR: Rob Tillaart // DATE: 2023-04-15 // PURPOSE: list of atomic weights (scaled to uint16_t) // generated with generate_uint16_table.ino // URL: https://github.com/RobTillaart/AtomicWeight ////////////////////////////////////////////// // // list...
#pragma once // // FILE: minerals.h // AUTHOR: Rob Tillaart // DATE: 2024-08-12 // PURPOSE: very short list of chemical formulae of minerals // URL: https://github.com/RobTillaart/AtomicWeight // ///////////////////////////////////////////////////////////////////////// // // The formulae are based upon Co...
#pragma once // // FILE: elements_float.h // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // PURPOSE: list of weights (float) // URL: https://github.com/RobTillaart/AtomicWeight ///////////////////////////////////////////////////////////////////////// // // float periodic table // struct element { char nam...
#pragma once // // FILE: elements_float.h // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // PURPOSE: list of weights (float) // URL: https://github.com/RobTillaart/AtomicWeight ///////////////////////////////////////////////////////////////////////// // // float periodic table // struct element { char nam...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2022-03-09 // PURPOSE: unit tests for the AtomicWeight library // https://github.com/RobTillaart/AtomicWeight // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ----------------------...
// // FILE: AverageAngle.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.3 // DATE: 2017-11-21 // PURPOSE: Arduino library to calculate correctly the average of multiple angles. // URL: https://github.com/RobTillaart/AverageAngle #include "AverageAngle.h" const float AA_OVERFLOW_THRESHOLD = 10000; AverageA...
#pragma once // // FILE: AverageAngle.h // AUTHOR: Rob Tillaart // VERSION: 0.2.3 // DATE: 2017-11-21 // PURPOSE: Arduino library to calculate correctly the average of multiple angles. // URL: https://github.com/RobTillaart/AverageAngle #include "math.h" #include "Arduino.h" #define AVERAGE_ANGLE_LIB_VERS...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the AverageAngle class // https://github.com/RobTillaart/AverageAngle // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ------------------------...
// // FILE: avrheap.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.7 // DATE: 2015-10-25 // PURPOSE: Experimental Arduino library to investigate the AVR heap Arduino UNO // URL: https://github.com/RobTillaart/avrheap // // REFERENCES // http://forum.arduino.cc/index.php?topic=27536.15 // http://forum.arduino...
#pragma once // // FILE: avrheap.h // AUTHOR: Rob Tillaart // VERSION: 0.2.7 // DATE: 2015-10-25 // PURPOSE: Experimental Arduino library to investigate the AVR heap Arduino UNO #if !defined(ARDUINO_ARCH_AVR) #error “Avrheap library only AVR boards, tested only with UNO.†#endif #include "Arduino.h" #in...
// // FILE: BH1750FVI.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.3 // PURPOSE: library for BH1750FVI lux sensor Arduino // URL: https://github.com/RobTillaart/BH1750FVI_RT #include "BH1750FVI.h" // COMMANDS P5 #define BH1750FVI_POWER_ON 0x00 #define BH1750FVI_POWER_OFF ...
#pragma once // // FILE: BH1750FVI.h // AUTHOR: Rob Tillaart // VERSION: 0.3.3 // PURPOSE: Arduino library for BH1750FVI (GY-30) lux sensor // URL: https://github.com/RobTillaart/BH1750FVI_RT // breakout BH1750FVI / GY-30 // // +-----------------------+ // GND |o | // ADD |o ...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the BH1750FVI_RT (GY-30) lux sensor library // https://github.com/RobTillaart/BH1750FVI_RT // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---...
// // FILE: BitArray.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.8 // PURPOSE: BitArray library for Arduino // URL: https://github.com/RobTillaart/BitArray // http://forum.arduino.cc/index.php?topic=361167 #include "BitArray.h" BitArray::BitArray() { for (uint8_t i = 0; i < BA_MAX_SEGMENTS; i++) ...
#pragma once // // FILE: bitArray.h // AUTHOR: Rob Tillaart // VERSION: 0.2.8 // PURPOSE: BitArray library for Arduino // URL: https://github.com/RobTillaart/BitArray // BitArray allows you to make a compact array of objects with a size // expressed in bits. typically 1..10. // The interface uses uint32_t a...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-13 // PURPOSE: unit tests for the BitArray // https://github.com/RobTillaart/BitArray // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assert...
// // FILE: bitHelpers.cpp // AUTHOR: Rob Tillaart // VERSION: 0.1.12 // DATE: 2015-11-07 // PURPOSE: Arduino library with functions on bit level // URL: https://github.com/RobTillaart/bitHelpers #include "bitHelpers.h" //////////////////////////////////////////////// // // BIT COUNT TEST // uint8_t bit...
#pragma once // // FILE: bitHelpers.h // AUTHOR: Rob Tillaart // VERSION: 0.1.12 // DATE: 2015-11-07 // PURPOSE: Arduino library with functions on bit level // URL: https://github.com/RobTillaart/bitHelpers #include "Arduino.h" #define BITHELPER_LIB_VERSION (F("0.1.12")) // used by bitRot() //...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the bitHelpers.h // https://github.com/RobTillaart/bitHelpers // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // ...
// // FILE: BoolArray.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.0 // DATE: 2015-12-06 // PURPOSE: BoolArray library for Arduino // URL: https://github.com/RobTillaart/BoolArray // http://forum.arduino.cc/index.php?topic=361167 #include "BoolArray.h" //////////////////////////////////////////////...
#pragma once // // FILE: BoolArray.h // AUTHOR: Rob Tillaart // VERSION: 0.3.0 // DATE: 2015-12-06 // PURPOSE: BoolArray library for Arduino // URL: https://github.com/RobTillaart/BoolArray.git // BoolArray implement a compact array of booleans of max size 2000. // For larger arrays one need to modify the...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-14 // PURPOSE: unit tests for the BoolArray library // https://github.com/RobTillaart/BoolArray // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ----------------------------...
// // FILE: CHT8305.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.3 // PURPOSE: Arduino library for CHT8305 temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT8305 #include "CHT8305.h" ///////////////////////////////////////////////////// // // PUBLIC // CHT8305::CHT8305(const uint8_t a...
#pragma once // // FILE: CHT8305.h // AUTHOR: Rob Tillaart // VERSION: 0.2.3 // PURPOSE: Arduino library for CHT8305 temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT8305 // #include "Arduino.h" #include "Wire.h" #define CHT8305_LIB_VERSION (F("0.2.3")) // DEFAULT ADD...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2022-10-06 // PURPOSE: unit tests for the CHT8305 temperature and humidity sensor // https://github.com/RobTillaart/CHT8305 // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // --------...
// // FILE: CHT8310.cpp // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // DATE: 2024-02-04 // PURPOSE: Arduino library for CHT8310 temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT8310 #include "CHT8310.h" // REGISTERS #define CHT8310_REG_TEMPERATURE 0x00 #define CHT8310_REG...
#pragma once // // FILE: CHT8310.h // AUTHOR: Rob Tillaart // VERSION: 0.2.1 // DATE: 2024-02-04 // PURPOSE: Arduino library for CHT8310 temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT8310 // #include "Arduino.h" #include "Wire.h" #define CHT8310_LIB_VERSION (F("0....
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2024-02-04 // PURPOSE: unit tests for the CHT8310 temperature and humidity sensor // https://github.com/RobTillaart/CHT8310 // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // --------...
// // FILE: CHT832X.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.0 // DATE: 2024-12-29 // PURPOSE: Arduino library for CHT832X temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT832X #include "CHT832X.h" // COMMANDS datasheet Page 12/13 const uint16_t CHT832X_CMD_SINGLE_SHOT ...
#pragma once // // FILE: CHT832X.h // AUTHOR: Rob Tillaart // VERSION: 0.3.0 // DATE: 2024-12-29 // PURPOSE: Arduino library for CHT832X temperature and humidity sensor // URL: https://github.com/RobTillaart/CHT832X #include "Arduino.h" #include "Wire.h" #define CHT832X_LIB_VERSION (F("0.3.0...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2025-01-04 // PURPOSE: unit tests for the CHT832X temperature and humidity sensor // https://github.com/RobTillaart/CHT832X // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // --------...
// // FILE: Complex.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.5 // DATE: 2013-09-23 // PURPOSE: Arduino library for Complex math // URL: https://github.com/RobTillaart/Complex // http://arduino.cc/playground/Main/ComplexMath #include "Complex.h" // PRINTING size_t Complex::printTo(Print& p) c...
#pragma once // // FILE: Complex.h // AUTHOR: Rob Tillaart // VERSION: 0.3.5 // DATE: 2013-09-23 // PURPOSE: Arduino library for Complex math // URL: https://github.com/RobTillaart/Complex // http://arduino.cc/playground/Main/ComplexMath #include "Arduino.h" #include "Printable.h" #define COMPLE...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-16 // PURPOSE: unit tests for the Complex datatype Library // https://github.com/RobTillaart/Complex // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // -----------------------...
// // FILE: Correlation.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.3 // PURPOSE: Arduino Library to determine correlation between X and Y dataset // URL: https://github.com/RobTillaart/Correlation #include "Correlation.h" Correlation::Correlation(uint8_t size) { _size = 20; if (size > 0) _size = size; ...
#pragma once // // FILE: Correlation.h // AUTHOR: Rob Tillaart // VERSION: 0.3.3 // PURPOSE: Calculate Correlation from a small dataset. // URL: https://github.com/RobTillaart/Correlation #include "Arduino.h" #define CORRELATION_LIB_VERSION (F("0.3.3")) class Correlation { public: Correlation(u...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the Correlation library // https://github.com/RobTillaart/Correlation // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // https://github.com/Ardui...
// // FILE: CountDown.cpp // AUTHOR: Rob Tillaart // VERSION: 0.3.4 // PURPOSE: CountDown library for Arduino // URL: https://github.com/RobTillaart/CountDown #include "CountDown.h" CountDown::CountDown(const enum Resolution res) { _state = CountDown::STOPPED; _remaining = 0; _startTime = 0; // _re...
#pragma once // // FILE: CountDown.h // AUTHOR: Rob Tillaart // VERSION: 0.3.4 // PURPOSE: CountDown library for Arduino // URL: https://github.com/RobTillaart/CountDown #include "Arduino.h" #define COUNTDOWN_LIB_VERSION (F("0.3.4")) class CountDown { public: enum Resolution { MICROS = 'u',...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the CountDown Library // https://github.com/RobTillaart/CountDown // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // https://github.com/Arduino-C...
// // FILE: Cozir.cpp // AUTHOR: DirtGambit & Rob Tillaart // VERSION: 0.3.8 // PURPOSE: library for COZIR range of sensors for Arduino // Polling Mode + stream parser // URL: https://github.com/RobTillaart/Cozir // http://forum.arduino.cc/index.php?topic=91467.0 // // READ DATASHEET BEFOR...
#pragma once // // FILE: Cozir.h // VERSION: 0.3.8 // PURPOSE: library for COZIR range of sensors for Arduino // Polling Mode + stream parser // URL: https://github.com/RobTillaart/Cozir // http://forum.arduino.cc/index.php?topic=91467.0 // // READ DATASHEET BEFORE USE OF THIS LIB ! // #i...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2020-12-03 // PURPOSE: unit tests for the Cozir CO2 library // https://github.com/RobTillaart/Cozir // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // https://github.com/Arduino-CI/ar...
#include "Arduino.h" #include "foo.h" #include "CrcFastReverse.h" int foo(int n) { return reverse8bits(n); }
//namespace foo //{ // #include "Arduino.h" // #include "CRC.h" // // int foo(int n); //} #include "Arduino.h" #include "CRC.h" int foo(int n);
// // FILE: CRC.cpp // AUTHOR: Rob Tillaart // VERSION: 1.0.2 // PURPOSE: Arduino library for CRC8, CRC12, CRC16, CRC32, CRC64 // URL: https://github.com/RobTillaart/CRC #include "CRC.h" uint8_t calcCRC8( const uint8_t *array, crc_size_t length, uint8_t polynome, uint8_t initial, uint8_t xorOut, bool r...
#pragma once // // FILE: CRC.h // AUTHOR: Rob Tillaart // VERSION: 1.0.2 // PURPOSE: Arduino library for CRC8, CRC12, CRC16, CRC32, CRC64 // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CRC8.h" #include "CRC12.h" #include "CRC16.h" #include "CRC32.h" #include "CRC64.h" #define...
// // FILE: CRC12.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC12 // URL: https://github.com/RobTillaart/CRC #include "CRC12.h" #include "CrcFastReverse.h" CRC12::CRC12(uint16_t polynome, uint16_t initial, uint16_t xorOut, bool reverseIn, b...
#pragma once // // FILE: CRC12.h // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC12 // URL: https://github.com/RobTillaart/CRC // https://github.com/RobTillaart/CRC/issues/13 #include "CrcParameters.h" #include "CrcDefines.h" class CRC12 { public: CRC12(uint16_t polynome = CRC12_POLYNOME...
// // FILE: CRC16.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC16 // URL: https://github.com/RobTillaart/CRC #include "CRC16.h" #include "CrcFastReverse.h" CRC16::CRC16(uint16_t polynome, uint16_t initial, uint16_t xorOut, bool reverseIn, b...
#pragma once // // FILE: CRC16.h // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC16 // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CrcDefines.h" class CRC16 { public: CRC16(uint16_t polynome = CRC16_POLYNOME, uint16_t initial = CRC16_INITIAL, uint...
// // FILE: CRC32.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC32; // URL: https://github.com/RobTillaart/CRC #include "CRC32.h" #include "CrcFastReverse.h" CRC32::CRC32(uint32_t polynome, uint32_t initial, uint32_t xorOut, bool reverseIn, ...
#pragma once // // FILE: CRC32.h // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC32 // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CrcDefines.h" class CRC32 { public: CRC32(uint32_t polynome = CRC32_POLYNOME, uint32_t initial = CRC32_INITIAL, uint...
// // FILE: CRC64.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC64; // URL: https://github.com/RobTillaart/CRC #include "CRC64.h" #include "CrcFastReverse.h" CRC64::CRC64(uint64_t polynome, uint64_t initial, uint64_t xorOut, bool reverseIn, ...
#pragma once // // FILE: CRC64.h // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC64 // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CrcDefines.h" class CRC64 { public: CRC64(uint64_t polynome = CRC64_POLYNOME, uint64_t initial = CRC64_INITIAL, uint...
// // FILE: CRC8.cpp // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC8; // URL: https://github.com/RobTillaart/CRC #include "CRC8.h" #include "CrcFastReverse.h" CRC8::CRC8(uint8_t polynome, uint8_t initial, uint8_t xorOut, bool reverseIn, bool reverseOut)...
#pragma once // // FILE: CRC8.h // AUTHOR: Rob Tillaart // PURPOSE: Arduino class for CRC8 // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CrcDefines.h" class CRC8 { public: CRC8(uint8_t polynome = CRC8_POLYNOME, uint8_t initial = CRC8_INITIAL, uint8_t xorOut...
#pragma once // // FILE: CrcDefines.h // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC #include <Arduino.h> #if defined(CRC_CUSTOM_SIZE) using crc_size_t = CRC_CUSTOM_SIZE; #elif defined(__AVR__) using crc_size_t = uint16_t; #else using crc_size_t = size_t;...
// // FILE: CrcFastReverse.cpp // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC #include "CrcFastReverse.h" uint8_t reverse8bits(uint8_t in) { uint8_t x = in; x = (((x & 0xAA) >> 1) | ((x & 0x55) << 1)); x = (((x & 0xCC) >> 2) | ((x & 0x33) << 2)); ...
#pragma once // // FILE: CrcFastReverse.h // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC #include "Arduino.h" uint8_t reverse8bits(uint8_t in); uint16_t reverse16bits(uint16_t in); uint16_t reverse12bits(uint16_t in); uint32_t reverse32bits(uint32_t in); u...
#pragma once // // FILE: CrcParameters.h // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC // Polynomes from // https://en.wikipedia.org/wiki/Cyclic_redundancy_check#Polynomial_representations_of_cyclic_redundancy_checks #define CRC_YIELD_DISABLED 0...
// // FILE: FastCRC32.cpp // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC #include "FastCRC32.h" namespace { // Conditionally use pgm memory if it is available. #if defined(PROGMEM) #define FLASH_PROGMEM PROGMEM #define FLASH_READ_DWORD(x) (pgm_rea...
#pragma once // // FILE: FastCRC32.h // AUTHOR: vovagorodok // PURPOSE: Arduino class for CRC // URL: https://github.com/RobTillaart/CRC #include "CrcParameters.h" #include "CrcDefines.h" class FastCRC32 { public: FastCRC32(); void restart(); uint32_t calc() const; crc_size_t count() const; void ...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2021-01-01 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assertEq...
// // FILE: unit_test_crc16.cpp // AUTHOR: Rob Tillaart // DATE: 2021-03-31 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assert...
// // FILE: unit_test_crc16.cpp // AUTHOR: Rob Tillaart // DATE: 2021-03-31 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assert...
// // FILE: unit_test_crc32.cpp // AUTHOR: Rob Tillaart // DATE: 2021-03-31 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assert...
// // FILE: unit_test_crc64.cpp // AUTHOR: Rob Tillaart // DATE: 2021-03-31 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assert...
// // FILE: unit_test_crc8.cpp // AUTHOR: Rob Tillaart // DATE: 2021-03-31 // PURPOSE: unit tests for the CRC library // https://github.com/RobTillaart/CRC // https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md // // supported assertions // ---------------------------- // assertE...
// // FILE: currency.cpp // AUTHOR: Rob Tillaart // VERSION: 0.1.9 // PURPOSE: Currency library for Arduino // URL: https://github.com/RobTillaart/Currency #include "currency.h" char * currency(int32_t value, int decimals, char decimalSeparator, char thousandSeparator, char symbol) { static char tmp[16]; ...
#pragma once // // FILE: currency.h // AUTHOR: Rob Tillaart // VERSION: 0.1.9 // PURPOSE: Currency library for Arduino // URL: https://github.com/RobTillaart/Currency #include "Arduino.h" #define CURRENCY_VERSION (F("0.1.9")) // TODO // optimize this 99% same code currency - curr...
// // FILE: unit_test_001.cpp // AUTHOR: Rob Tillaart // DATE: 2021-02-27 // PURPOSE: unit tests for the printHelpers // https://github.com/RobTillaart/currency // // supported assertions // ---------------------------- // assertEqual(expected, actual); // a == b // assertNotEqual(unwante...
// // FILE: DAC53001.cpp // AUTHOR: Rob Tillaart // DATE: 2025-02-12 // VERSION: 0.1.0 // PURPOSE: Arduino library for I2C DAC53001 10 bit DAC. // URL: https://github.com/RobTillaart/DAC53001 // #include "DAC53001.h" //////////////////////////////////////////////////////// // // I2C REGISTERS - datashee...