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 <WiFiNINA.h> | |
typedef struct { | |
unsigned char r; | |
unsigned char g; | |
unsigned char b; | |
} RGB; | |
typedef struct { | |
unsigned char h; |
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 <EEPROM.h> | |
#define EEPROM_SIZE 64 | |
bool has_credentials() { | |
return EEPROM.read(0) == 0x42 /* credentials marker */; | |
} | |
void save_credentials(char *ssid, char *pass) { |
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> | |
#define R_LED_PIN 32 | |
#define G_LED_PIN 33 | |
#define B_LED_PIN 25 | |
#define R_CH 0 | |
#define G_CH 1 | |
#define B_CH 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
const express = require('express') | |
const open = require('open'); | |
const app = express() | |
const port = 3000 | |
const log = console.log; | |
let started = true; |
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
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Creates an SNS topic and an SQS queue. Subscribes the queue to the created topic | |
Parameters: | |
Environment: | |
Default: dev | |
Type: String | |
AllowedPattern: "(dev|stage|local-[0-9a-zA-Z]*)" | |
Resources: |
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
[env:blackpill_f411ce] | |
; monitor_speed = 115200 | |
platform = ststm32 | |
board = blackpill_f411ce | |
framework = arduino | |
upload_protocol = stlink | |
build_flags = | |
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC | |
-D USBCON |
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> | |
HardwareTimer *timer; | |
volatile int state = LOW; | |
void isr() { | |
digitalWrite(PC13, state); | |
state = !state; | |
} |
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 <Encoder.h> | |
#include <Servo.h> | |
Encoder encoder(2, 3); | |
long last_postition; | |
Servo esc; | |
void setup() { | |
Serial.begin(115200); |
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://en.wikipedia.org/wiki/Low-pass_filter | |
import numpy as np | |
import matplotlib.pyplot as plt | |
N = 1000 | |
t = np.linspace(0, 10, N) | |
x = np.sin(t) + np.cos(100 * t + np.random.normal(0, 1, N)) |
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> | |
#define STEP_PIN 21 | |
#define DIR_PIN 17 | |
#define PPR 400 | |
#define TICKS_PER_SECOND 200000 | |
hw_timer_t * timer = NULL; | |
volatile uint32_t ticksPerPulse = TICKS_PER_SECOND; |