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
// STM32F303K8 (Slave) | |
#include "main.h" | |
#include "usart.h" | |
/* | |
RP2040 ---- STM32F303K8 | |
UART0_TX GPIO16 ---\/--- PB6 UART1_TX | |
UART0_RX GPIO17 <--/\--> PB7 UART1_RX |
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
void setup() { | |
// instead of pinMode(30, OUTPUT); | |
(&(PORT->Group[PORTA]))->PINCFG[30].reg = (uint8_t)(PORT_PINCFG_INEN); | |
(&(PORT->Group[PORTA]))->PINCFG[31].reg = (uint8_t)(PORT_PINCFG_INEN); | |
(&(PORT->Group[PORTA]))->DIRSET.reg = (1 << 30); | |
(&(PORT->Group[PORTA]))->DIRSET.reg = (1 << 31); | |
} | |
void loop() { | |
// instead of digitalWrite(30, HIGH); |
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
// Code from: https://www.hackster.io/voske65/high-speed-pwm-on-arduino-atsamd21-859b06 | |
/* | |
HIGH FREQ PWM SETUP FOR MKR1000 - SAMW25 = SAMD21 with some other pinning | |
MKR1000's pins than can be defined as TCC timer pins and their associated channel (WO[X]) | |
unless stated otherwise the TCC timers are on peripheral F: | |
A0 - PA02 - None |
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
#define MAX_VALUE ((1 << 10) - 1) | |
#define SIN_MAX (MAX_VALUE / 2.0) | |
void setup() { | |
DAC->CTRLA.bit.ENABLE = 0x01; | |
syncDAC(); | |
} | |
double i = 0.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
// このスケッチは以下の投稿にあるものを改良したもの | |
// https://forum.arduino.cc/index.php?topic=575333.0 | |
char text[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR" | |
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR" | |
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR" | |
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQR"; | |
void setup() { | |
Serial.begin(250000); |
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 <SPI.h> | |
#define PIN_SCK 13 | |
#define PIN_SDI 11 | |
#define PIN_LATCH 10 | |
#define SCROLL_SPEED 250 | |
const byte digits[] PROGMEM = { | |
0b11111100, // 0 | |
0b01100000, // 1 |
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 <SPI.h> | |
#define PIN_SCK 13 | |
#define PIN_SDI 11 | |
#define PIN_LATCH 10 | |
#define SCROLL_SPEED 10 | |
const byte digits[] PROGMEM = { | |
0b10000000, // 1 | |
0b01000000, // 2 |
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 <SPI.h> | |
#define PIN_SCK 13 | |
#define PIN_SDI 11 | |
#define PIN_LATCH 10 | |
#define SCROLL_SPEED 50 | |
const byte digits[] PROGMEM = { | |
0b11111100, // 0 | |
0b01100000, // 1 |
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 "aqm1602.h" | |
AQM1602::AQM1602(uint8_t i2cAddress, uint8_t voltage, uint8_t contrast) { | |
this->i2cAddress = i2cAddress; | |
this->contrast = contrast; | |
this->voltage = voltage; | |
this->displayControl = 0x00; | |
// ACM series = 0x80 | |
// AQM series = 0x40 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder