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
import machine, neopixel, time | |
from machine import Pin, ADC | |
np = neopixel.NeoPixel(Pin(2), 200) | |
adcpin = machine.ADC(26) | |
while True: | |
num_of_leds = None | |
for i in range(len(np)): | |
onvalue = 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
#include <MQTTZephyr.h> | |
void TimerCountdownMS(Timer* timer, unsigned int timeout_ms) | |
{ | |
timer->end_time = k_uptime_get() + timeout_ms; | |
} | |
void TimerCountdown(Timer* timer, unsigned int timeout) |
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
#pragma once | |
#include <zephyr/types.h> | |
#include <stddef.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <misc/printk.h> | |
#include <misc/byteorder.h> | |
#include <zephyr.h> |