Skip to content

Instantly share code, notes, and snippets.

View dapprogrammer's full-sized avatar

Duff Bastasa dapprogrammer

View GitHub Profile
/*
PROJECT: Solar-Powered Smart Lock - Arduino Master Controller
DESCRIPTION:
This version communicates with a NodeMCU using a 3-bit binary signal.
It uses the signalToNodeMCU function to send specific codes for different events
like lock, unlock, tamper, and registration mode.
REVISION 8 - Restored 3-Bit Communication
*/
#include <Keypad.h>
#include <Servo.h>
@dapprogrammer
dapprogrammer / coroutines.kt
Last active February 13, 2025 06:17
Kotlin Coroutine
import kotlinx.coroutines.* // add dependencies in gradle if using intellij
suspend fun fetchUserData(): String {
delay(2000)
return "User data retrieved: Duff Bastasa"
}
fun previewUserDate() = runBlocking {
println("Fetching user data...")
println(fetchUserData())
}