Skip to content

Instantly share code, notes, and snippets.

@therafman
therafman / chip-flashing-guide-nov-2018.md
Created January 26, 2025 05:58 — forked from verticalgrain/chip-flashing-guide-nov-2018.md
NextThingCo C.H.I.P. Flashing guide as of November, 2018

Below are the steps required to flash a NextThingCo CHIP or PocketCHIP from the command line, as of November 2018. The web flasher no longer works, and there are numerous errors when flashing from the command line, mostly due to broken dependencies. The following method works for flashing a CHIP as of November 2018:

Note: Flashing must be done on Linux. Tested on Ubuntu and Rasparian. Mac OS seems to not work.

  1. Download and unpack the CHIP-SDK.zip from one of the following:
  1. Download and unpack CHIP-tools.zip from one of the following:
@therafman
therafman / tinycubesat.cpp
Created May 18, 2022 07:52 — forked from mohitbhoite/tinycubesat.cpp
Simple low powerLED blink pattern for the ATtiny based satellite sculpture
#include <avr/sleep.h> //Needed for sleep_mode
#include <avr/wdt.h> //Needed to enable/disable watch dog timer
void setup() {
pinMode(0, OUTPUT);// LED connected to pin 5 which is recognised as pin 0 by arduino
ADCSRA &= ~(1<<ADEN); //Disable ADC, saves ~230uA
//Power down various bits of hardware to lower power usage
set_sleep_mode(SLEEP_MODE_PWR_DOWN); //Power down everything, wake up from WDT
sleep_enable();
}
# Terry Spitz 2018
# word clock for waveshare ePaper
# based on https://github.com/mattohagan/word-clock/blob/master/word_clock.py
try:
import epd7in5
except:
#continue without ePaper display for debugging
epd7in5 = None
from PIL import Image, ImageDraw, ImageFont
#define SSID "wi-fi_login" // ваш SSID
#define PASS "wi-fi_password" // ваш пароль Wi-Fi
#define SMTPServer "s02.atomsmtp.com" //smtp сервер
#define SMTPPort "2525" // smtp порт
#define MailLogin "[email protected]" // логин для smtp
#define MailLoginBase64 "dWd1LCBrb25lNG5vCg==" //логин для smtp в Base64
#define MailPasswordBase64 "aHJlbiB0YW0K" // пароль для smtp в Base64
#define MailRelay "[email protected]" // промежуточная почта для "отмывания" email
#define PhoneNumber "375290000000" // номер телефона
@therafman
therafman / NeoPixelTest.ino
Created October 14, 2015 02:37 — forked from dougalcampbell/NeoPixelTest.ino
Example of driving an Adafruit NeoPixel Ring with the Digispark Arduino-compatible board
#include <Adafruit_NeoPixel.h>
#define PIN 1
#define STRIPSIZE 16
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)