Skip to content

Instantly share code, notes, and snippets.

View IdrisCytron's full-sized avatar

Idris Zainal Abidin IdrisCytron

View GitHub Profile
@IdrisCytron
IdrisCytron / XiaoSoilMoistureAlarm.py
Created October 27, 2020 07:50
Soil Moisture Alarm Using CircuitPython on Seeeduino XIAO
import time
import board
import simpleio
import digitalio
from analogio import AnalogIn
led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT
piezo = board.A3
@IdrisCytron
IdrisCytron / code.py
Created October 20, 2020 07:39
Program Seeeduino XIAO using CircuitPython - LED Blinking
# Board: Seeeduino XIAO
import time
import board
from digitalio import DigitalInOut, Direction
led = DigitalInOut(board.D13)
led.direction = Direction.OUTPUT
while True:
@IdrisCytron
IdrisCytron / SenseHATFlappyAstronaut.py
Created October 14, 2020 07:56
Playing Flappy Astronaut Game on Raspberry Pi Sense HAT
# References:
# https://projects.raspberrypi.org/en/projects/flappy-astronaut
from sense_hat import SenseHat
from random import randint
from time import sleep
sense = SenseHat()
RED = (255, 0, 0)
BLUE = (0, 0, 255)
@IdrisCytron
IdrisCytron / PiGoogleSheetsSenseHAT.py
Last active October 5, 2020 02:48
Log sensor data from Sense HAT to Google Sheets using Raspberry Pi
from sense_hat import SenseHat
from time import time
import datetime
import requests
sense = SenseHat()
sense.clear()
send = False
@IdrisCytron
IdrisCytron / SenseHatSnakeGame.py
Last active June 2, 2021 06:50
Playing the Snake game on Raspberry Pi Sense Hat
from sense_hat import SenseHat
from time import sleep
import random
sense = SenseHat()
sense.low_light = True
GREEN = (0, 255, 0)
RED = (255, 0, 0)
YELLOW = (255, 255, 0)
@IdrisCytron
IdrisCytron / NanoPulseLCD.ino
Last active September 21, 2020 14:06
Heart Rate Monitor Using Pulse Sensor and Maker Nano
/*
Project: Heart Rate Monitor Using Pulse Sensor and Maker Nano
Board: Arduino Nano (Maker Nano)
Connections:
Nano | I2C LCD Grove
GND - GND
5V - VCC
SDA - SDA
SCL - SCL
@IdrisCytron
IdrisCytron / NanoKeypadNeoPixel.ino
Last active September 13, 2020 13:24
Control NeoPixel RGB LED Color Code Using Keypad and Maker Nano.
/*
Project: Control NeoPixel RGB LED Color Code Using Keypad and Maker Nano #ArduinoNano
Board: Arduino Nano (Maker Nano)
Connections:
Nano | I2C LCD Grove
GND - GND
5V - VCC
SDA - SDA
SCL - SCL
@IdrisCytron
IdrisCytron / M5StackSIM800LSMS.ino
Created September 8, 2020 05:02
Monitor Temperature Humidity Through SMS Using M5Stack and SIM800L
/*
Project: Monitor Temperature Humidity Through SMS Using M5Stack and SIM800L
Board: M5Stack-Core-ESP32
Connections:
ESP32 | SIM800L
IO17 - RX
IO16 - TX
IO5 - RST
@IdrisCytron
IdrisCytron / Fingerprint.cpp
Last active August 25, 2020 08:34
Interface Fingerprint Sensor Using M5Stack Core ESP32 Development Kit
#include <M5Stack.h>
#include "Fingerprint.h"
Fingerprint::Fingerprint(void)
{
Serial1.begin(19200, SERIAL_8N1, FINGER_TX, FINGER_RX);
}
uint8_t Fingerprint::TxAndRxCmd(uint8_t Scnt, uint8_t Rcnt, uint16_t Delay_ms)
@IdrisCytron
IdrisCytron / MicrobitBlynkSerial.py
Created August 11, 2020 06:13
Control LED on EDU:BIT Using IoT Blynk App and Raspberry Pi
from microbit import *
import music
music.play(["C4:1", "G4:1"])
pot_value = 0
pot_prev = 0
data_in = ''
while True: