This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* HexDump.cpp | |
* Hex memory dump utility functions for Arduino. 0x00 and 0xFF are printed as spaces. | |
* | |
* Sample output: | |
* 0x0000: 0xF1 0x81 0x82 0x00 0x08 0x02 0x00 0x27 0xFF 0xFF 0x0E 0xB3 0x81 0xFC 0x9B 0x47 ... .. ' .....G | |
* 0x0020: 0x00 0x00 0x00 0x00 0x20 0x65 0x00 0x0F 0xBE 0xEB 0x9B 0x98 0x2C 0xF1 0x08 0x2C e .....,.., | |
* | |
* Copyright (C) 2022 Armin Joachimsmeyer | |
* Email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
RobotArmKinematics.cpp | |
Contains the kinematics functions for the meArm robot arm | |
See also: https://www.instructables.com/id/4-DOF-Mechanical-Arm-Robot-Controlled-by-Arduino | |
and: https://github.com/ArminJo/ServoEasing/tree/master/examples/RobotArmControl | |
Servo trims are chosen, so that 0°, 0°, 0° (left/right, back/front, up/down) results in the neutral position of the robot arm. | |
Neutral means: pivot direction forward, and both arms rectangular up and forward | |
Neutral position: X=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 433MHzSenderPT2262.cpp | |
* | |
* 433 MHz sender for PT2262/PT2272 sender/receiver chip combinations. | |
* https://cdn-shop.adafruit.com/datasheets/PT2262.pdf | |
* | |
* Copyright (C) 2020 Armin Joachimsmeyer | |
* [email protected] | |
* | |
* 433MHzSenderPT2262 is free software: you can redistribute it and/or modify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <digitalWriteFast.h> | |
/* | |
* HX2262/2272 Stuff | |
*/ | |
// measured 33.91 kHz receiver clock => Data sheet says: Transmitter clock has to be 2.5 to 8 times slower | |
// https://cdn-shop.adafruit.com/datasheets/PT2262.pdf | |
//const int HX2272_FUNDAMENTAL_CLOCK_PERIOD_X4_MICROS = 118; | |
const int HX2272_FUNDAMENTAL_CLOCK_PERIOD_X4_MICROS = 440; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Overlap means drawing additional pixel when changing minor direction | |
* Needed for drawThickLine, otherwise some pixels will be missing in the thick line | |
*/ | |
#define LINE_OVERLAP_NONE 0 // No line overlap, like in standard Bresenham | |
#define LINE_OVERLAP_MAJOR 0x01 // Overlap - first go major then minor direction. Pixel is drawn as extension after actual line | |
#define LINE_OVERLAP_MINOR 0x02 // Overlap - first go minor then major direction. Pixel is drawn as extension before next line | |
#define LINE_OVERLAP_BOTH 0x03 // Overlap - both | |
#define LINE_THICKNESS_MIDDLE 0 // Start point is on the line at center of the thick line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
// See: https://github.com/ArminJo/Arduino-Utils/blob/master/src/MillisUtils.cpp | |
/* | |
* storage for millis value to enable compensation for interrupt disable at signal acquisition etc. | |
*/ | |
#if ( defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) ) | |
#define timer0_millis millis_timer_millis // The ATTinyCore libraries use other variable name in wiring.c | |
#endif | |
#if defined(TIMSK) && !defined(TIMSK0) // some ATtinys | |
#define TIMSK0 TIMSK |