Skip to content

Instantly share code, notes, and snippets.

Avatar

Idris Zainal Abidin IdrisCytron

View GitHub Profile
@IdrisCytron
IdrisCytron / XiaoSoilMoistureAlarm.py
Created Oct 27, 2020
Soil Moisture Alarm Using CircuitPython on Seeeduino XIAO
View XiaoSoilMoistureAlarm.py
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 Oct 20, 2020
Program Seeeduino XIAO using CircuitPython - LED Blinking
View code.py
# 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 Oct 14, 2020
Playing Flappy Astronaut Game on Raspberry Pi Sense HAT
View SenseHATFlappyAstronaut.py
# 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 Oct 5, 2020
Log sensor data from Sense HAT to Google Sheets using Raspberry Pi
View PiGoogleSheetsSenseHAT.py
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 Jun 2, 2021
Playing the Snake game on Raspberry Pi Sense Hat
View SenseHatSnakeGame.py
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 Sep 21, 2020
Heart Rate Monitor Using Pulse Sensor and Maker Nano
View NanoPulseLCD.ino
/*
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 Sep 13, 2020
Control NeoPixel RGB LED Color Code Using Keypad and Maker Nano.
View NanoKeypadNeoPixel.ino
/*
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 Sep 8, 2020
Monitor Temperature Humidity Through SMS Using M5Stack and SIM800L
View M5StackSIM800LSMS.ino
/*
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 Aug 25, 2020
Interface Fingerprint Sensor Using M5Stack Core ESP32 Development Kit
View Fingerprint.cpp
#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 Aug 11, 2020
Control LED on EDU:BIT Using IoT Blynk App and Raspberry Pi
View MicrobitBlynkSerial.py
from microbit import *
import music
music.play(["C4:1", "G4:1"])
pot_value = 0
pot_prev = 0
data_in = ''
while True: