Skip to content

Instantly share code, notes, and snippets.

View idriszmy's full-sized avatar

Idris Zainal Abidin idriszmy

View GitHub Profile
/*******************************************************************************
* THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTY AND SUPPORT
* IS APPLICABLE TO THIS SOFTWARE IN ANY FORM. CYTRON TECHNOLOGIES SHALL NOT,
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES, FOR ANY REASON WHATSOEVER.
********************************************************************************
* DESCRIPTION:
*
* This example is for controlling Ikedo Mini V2 using PS2 controller.
*
@idriszmy
idriszmy / IkedoMiniV2WithStrategies.ino
Last active June 30, 2024 05:36
Ikedo Mini V2 sumo robot with motor speed alignment, auto detection for edge and strategy (half moon) at DIP 1 and 4.
/*******************************************************************************
* THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTY AND SUPPORT
* IS APPLICABLE TO THIS SOFTWARE IN ANY FORM. CYTRON TECHNOLOGIES SHALL NOT,
* IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL
* DAMAGES, FOR ANY REASON WHATSOEVER.
********************************************************************************
* DESCRIPTION:
*
* This example is for the Autonomous Sumo Robot with:
* - motor speed alignment
@idriszmy
idriszmy / Barcodes.py
Last active April 23, 2024 19:36
Scan barcodes and QR codes using Raspberry Pi Zero W and Raspberry Pi Camera V3
#!/usr/bin/python3
'''
- Raspberry Pi Zero W
https://my.cytron.io/p-raspberry-pi-zero-w-and-bundles
- Raspberry Pi Camera Module 3 - 12MP with Auto Focus lens
https://my.cytron.io/p-raspberry-pi-camera-module-3-12mp-with-auto-focus-lens
- Raspberry Pi Zero/W/WH 15cm Camera Cable
https://my.cytron.io/p-raspberry-pi-zero-v1.3-camera-cable
@idriszmy
idriszmy / code.py
Created June 25, 2023 03:16
Raspberry Pi Pico - Fast line following robot
'''
How it works:
- https://vt.tiktok.com/ZSLkkvWB7/
'''
import time
import board
import digitalio
import pwmio
import analogio
@idriszmy
idriszmy / pizerow_telegram_photo.py
Created June 15, 2023 14:20
Send photo through Telegram using Raspberry Pi Zero W and Pi Camera Module 3
'''
Send '/picam3' to your Telegram bot to request photo
Devices:
- Raspberry Pi Zero W
https://my.cytron.io/p-raspberry-pi-zero-w-and-bundles
- Raspberry Pi Camera Module 3
https://my.cytron.io/p-raspberry-pi-camera-module-3-12mp-with-auto-focus-lens
Install Telepot
@idriszmy
idriszmy / capture_photo.py
Created May 23, 2023 02:41
Capture photo with custom settings (exposure, gain, white balance, brightness, saturation, etc) for Pi Camera HQ M12.
import time
from picamera2 import Picamera2, Preview
picam2 = Picamera2()
picam2.start_preview(Preview.QTGL)
preview_config = picam2.create_preview_configuration()
capture_config = picam2.create_still_configuration()
picam2.configure(preview_config)
@idriszmy
idriszmy / capture_video.py
Last active May 23, 2023 02:41
Capture video with custom settings (exposure, gain, white balance, brightness, saturation, etc) for Pi Camera Module 3.
#!/usr/bin/python3
# Video result:
# https://www.facebook.com/idriszmyblog/videos/6655806037765900
import time
from gpiozero import Button
from picamera2 import Picamera2
from picamera2.encoders import H264Encoder
@idriszmy
idriszmy / NanoRP2040Theramin.ino
Created November 30, 2022 07:41
Build fun piano with ultrasonic using Maker Nano RP2040
#define echoPin 12
#define trigPin 13
#define led1 14
#define led2 15
#define buzzer 22 // buzzer pin in Maker Nano RP2040 is 22
// defines variables
long duration; // variable for the duration of sound wave travel
int distance; // variable for the distance measurement
@idriszmy
idriszmy / code.py
Last active November 6, 2022 09:32
Display bitmap file on SSD1306/SSD1315 OLED using Raspberry Pi Pico W and CircuitPython
#
# Display bitmap file on SSD1315 OLED using Raspberry Pi Pico W and CircuitPython
#
# References and credit to
# - https://tutorial.cytron.io/2021/12/21/display-image-on-the-graphic-lcd-using-maker-nano-rp2040-and-circuitpython/
#
# Raspberry Pi Pico W
# - [Maker Pi Pico Mini] https://my.cytron.io/p-maker-pi-pico-mini-simplifying-projects-with-raspberry-pi-pico
# Arduino Grove Sensor Kit for Beginner, OR
# - https://my.cytron.io/p-arduino-grove-sensor-kit-for-beginner
@idriszmy
idriszmy / code.py
Last active January 16, 2024 08:07
Telegram Bot using CircuitPython on Raspberry Pi Pico W
"""
Telegram Bot using CircuitPython on Raspberry Pi Pico W
Items:
- Maker Pi Pico Mini
https://my.cytron.io/p-maker-pi-pico-mini-simplifying-projects-with-raspberry-pi-pico
- USB Micro B Cable
https://my.cytron.io/p-usb-micro-b-cable
CircuitPython Raspberry Pi Pico W