Skip to content

Instantly share code, notes, and snippets.

View sabas1080's full-sized avatar
🐈
Working

Sabas sabas1080

🐈
Working
View GitHub Profile
// Copyright 2017-2018 Pavitra, All rights reserved
// Released under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
package com.pavitra;
import android.content.Context;
import android.util.Log;
import com.physicaloid.lib.*;
@sabas1080
sabas1080 / lora.py
Created April 15, 2018 03:54 — forked from daveake/lora.py
from microbit import spi, sleep, pin16
import array
import gc
class LoRa(object):
"""
Radio - LoRa. Single channel.
"""
def __init__(self, Frequency=434.450, Mode=1):
@sabas1080
sabas1080 / PROGMEM.md
Created March 11, 2017 04:06 — forked from sticilface/PROGMEM.md
PROGMEM

Guide to PROGMEM on ESP8266 and Arduino IDE

Intro

On low memory devices like the arduino and esp8266 you do not want strings to be stored in RAM. This occurs by default on these systems. Declare a string const char * xyz = "this is a string" and it will use up RAM.

The solution on these devices is to allow strings to be stored in read only memory, in Arduino this is the PROGMEM macro. Most of my experience is with the ESP8266 which is a 32bit micros controller. This device stores PROGMEM data in flash. The macro PROGMEM on ESP8266 is simply

#define PROGMEM   ICACHE_RODATA_ATTR