This file contains hidden or 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
| // more fun with c++ classes and templates | |
| // http://www.stm32duino.com/viewtopic.php?f=18&t=303 | |
| class GPIOPort : | |
| public gpio_reg_map { | |
| public: | |
| void high(const uint32_t pin) { | |
| BSRR = 1 << pin; | |
| } | |
| void low(const uint32_t pin) { | |
| BRR = 1 << pin; |
This file contains hidden or 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 <stdio.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <sys/resource.h> | |
| #include <sys/types.h> | |
| typedef struct s_block* t_block; | |
| struct s_block { | |
| size_t size; |
This file contains hidden or 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
| How to build avrdude from SVN: | |
| 1. svn co svn://svn.savannah.nongnu.org/avrdude/trunk | |
| 2. cd trunk/avrdude | |
| 3. ./bootstrap | |
| 4. ./configure |
This file contains hidden or 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
| /***************************************************************************** | |
| * | |
| * Atmel Corporation | |
| * | |
| * File : main.c | |
| * Compiler : IAR EWAAVR 2.28a/3.10c | |
| * Revision : $Revision: 1.1 $ | |
| * Date : $Date: Wednesday, July 13, 2005 10:43:44 UTC $ | |
| * Updated by : $Author: omella $ | |
| * |
This file contains hidden or 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
| https://github.com/espressif/arduino-esp32/issues/1024#issuecomment-360324759 | |
| Got it working! | |
| I will post here my notes and results so others know what to expect! | |
| I did this in a Pine64+ ARM (a 64bit ARM SBC). | |
| Before running this I had installed Arduino IDE with this script: https://github.com/pfeerick/pine64-scripts/blob/master/install-arduino-ide.sh | |
| To install ESP32 toolchain on Armbian: | |
| See: http://esp-idf.readthedocs.io/en/latest/get-started/linux-setup-scratch.html |
This file contains hidden or 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
| /* | |
| * Arduino Microwave Radar Motion Sensor Interface | |
| * https://Circuits4you.com | |
| * Oct 2018 | |
| */ | |
| int Sensor = 2; //Input Pin | |
| int LED = 13; // Led pin for Indication | |
| int flg = 0; //Change detection flag |
This file contains hidden or 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
| /* | |
| Features | |
| Module supports external voltage input of the 4-way acquisition (voltage input range of 0-5v) | |
| integrated photoresistor | |
| integrated thermistor | |
| integrated potentiometer | |
| Modules power indicator | |
| Modules with DA output indicator, when the module DA output interface voltage reaches a certain value, will be lit panel the DA output indicator, the higher the voltage, the more obvious indicator brightness | |
| Remove shunts to bypass on board integrated devices | |
| The left connector |
This file contains hidden or 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
| // High-accuracy square wave generator | |
| // based on ESP8266 | |
| // with runtime adjustable frequency, PWM width and offset | |
| // Output wave at pin 5 (configurable from 0 to 15, but not 16) | |
| // by James Swineson <github@public.swineson.me>, 2017-10 | |
| // https://gist.github.com/Jamesits/92394675c0fe786467b26f90e95d3904 | |
| // See https://blog.swineson.me/implementation-of-6mbps-high-speed-io-on-esp8266-arduino-ide/ | |
| // for more information (article in Chinese) | |
| // Arduino UNO version: https://gist.github.com/Jamesits/8d164818946a65d0cafcd6203e3e5049 |
This file contains hidden or 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
| //convert RGB565 to RGB888 | |
| byte src[] = loadBytes("ui.bin"); | |
| byte dst[] = new byte[src.length/2*3]; | |
| for (int i=0, j=0; i<src.length; i+=2) { | |
| int c = src[i] + (src[i+1]<<8); | |
| byte r = byte(((c & 0xF800) >> 11) << 3); | |
| byte g = byte(((c & 0x7E0) >> 5) << 2); | |
| byte b = byte(((c & 0x1F)) << 3); |
This file contains hidden or 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
| /************************************************************************** | |
| ** ResizeDDA -- Reads an image from file 'f' one scan line at a time, | |
| ** outputs the image resized by the 'zoom' factor. | |
| */ | |
| void ResizeDDA(FILE *f, int rows, int cols, double zoom) | |
| { | |
| unsigned char *aspline, *line; | |
| int x, y; | |
| int ddax, dday, izoom, i, k; | |
| extern int getline(FILE *, int, unsigned char *); |