Compiler | Version | __cplusplus |
---|---|---|
g++ | 4.7.4 | 199711L |
5.5.0 | 199711L | |
6.1.0 | 201402L | |
10.2 | 201402L | |
11.1.0 | 201703L | |
clang++ | 3.4.2 | 199711L |
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
# emoji_flipper.py - show a bunch of emojis from a sprite sheet | |
# 23 Jun 2022 - @todbot / Tod Kurt | |
import time | |
import board | |
import displayio | |
sprite_fname = "emoji_spritesheet_27x7_28x28.bmp" | |
sprite_cnt = 27*7 | |
sprite_w,sprite_h = 28,28 |
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
; PlatformIO Project Configuration File | |
; | |
; Build options: build flags, source filter | |
; Upload options: custom upload port, speed and extra flags | |
; Library options: dependencies, extra library storages | |
; Advanced options: extra scripting | |
; | |
; Please visit documentation for the other options and examples | |
; https://docs.platformio.org/page/projectconf.html |
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
# Use this file to configure your wifi connection(s). | |
# | |
# Just uncomment the lines prefixed with a single # of the configuration | |
# that matches your wifi setup and fill in SSID and passphrase. | |
# | |
# You can configure multiple wifi connections by adding more 'network' | |
# blocks. | |
# | |
# See https://linux.die.net/man/5/wpa_supplicant.conf | |
# (or 'man -s 5 wpa_supplicant.conf') for advanced options going beyond |
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 <M5StickC.h> | |
#include <utility/MPU6886.h> // used for accessing MPU constants | |
#include <driver/rtc_io.h> | |
void mpu6886_wake_on_motion_isr(void); // declaration of ISR | |
void mpu6886_wake_on_motion_setup(void); // declaration of setup | |
// lifted from https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp | |
// if integrated with M5StickC library, use internal class function instead |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="google-signin-client_id" content="<CLIENT ID>"> | |
<title>Google Auth To AWS</title> | |
</head> | |
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.487.0.min.js"></script> |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""Template for python3 terminal scripts. | |
This gist allows you to quickly create a functioning | |
python3 terminal script using argparse and subprocess. | |
""" | |
import argparse |
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 AWS = require('aws-sdk') | |
AWS.config.region = process.env.AWS_REGION | |
const AWS_IOT_CORE_ENDPOINT = process.env.MQTT_BROKER_ENDPOINT | |
const IOT_THING_NAME = process.env.THING_NAME | |
const iotdata = new AWS.IotData({ | |
endpoint: AWS_IOT_CORE_ENDPOINT, | |
}) |
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 init_wifi(wifi_mode_t mode) | |
{ | |
const uint8_t protocol = WIFI_PROTOCOL_LR; | |
tcpip_adapter_init(); | |
ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) ); | |
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); | |
ESP_ERROR_CHECK( esp_wifi_init(&cfg) ); | |
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) ); | |
ESP_ERROR_CHECK( esp_wifi_set_mode(mode) ); | |
wifi_event_group = xEventGroupCreate(); |
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 "esp32_wdt.h" | |
#include <esp32-hal-timer.h> | |
static hw_timer_t *timer = NULL; | |
/** | |
* iInterrupt service routine called when the timer expires. | |
*/ | |
void IRAM_ATTR resetModule() { | |
ets_printf("watchdog reboot\n"); |
NewerOlder