This file contains hidden or 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
#!/bin/bash | |
# author: Muhammad Shofuwan Anwar | |
# created: Oct 1, 2025 | |
if [ $# -eq 0 ]; then | |
echo "[ERROR] No action specified." >&2 | |
echo "[INFO] Usage: $0 <command> [filename]" >&2 | |
echo "[INFO] Example:" >&2 | |
echo " Simulate: $0 circuit3" >&2 |
This file contains hidden or 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
#!/usr/bin/python3 | |
import os | |
files = [f for f in os.listdir('.') if os.path.isfile(os.path.join('.', f))] | |
output_files = 'results-count.csv' | |
tomato = {} | |
index = 0 | |
print('[INFO] counting the labels') |
This file contains hidden or 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 <Arduino.h> | |
// Urutan data yang akan dikirimkan | |
typedef struct { | |
int tank1; // data ke-1 | |
int tank2; // data ke-2 | |
String str; // data ke-3 | |
} data_t; | |
// data string acak (bebas) |
This file contains hidden or 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 <Arduino.h> | |
#define MOTOR_DIR_CW 0 | |
#define MOTOR_DIR_CCW 1 | |
#define MOTOR_ENABLE 1 | |
#define MOTOR_DISABLE 0 | |
#define STEPPER_PIN_PULL 7 | |
#define STEPPER_PIN_DIR 6 |
This file contains hidden or 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 <Arduino.h> | |
#define PAYLOAD_SIZE 3 | |
String payload_array[PAYLOAD_SIZE]; // simpan data dari labview | |
void parse_read (String data, String extract[PAYLOAD_SIZE]); | |
void setup() { | |
pinMode(LED_BUILTIN, OUTPUT); |
This file contains hidden or 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 <Arduino.h> | |
#define PIN_LED0 D8 | |
#define PIN_LED1 D7 | |
#define PIN_LED2 D6 | |
#define PIN_LED3 D5 | |
#define PIN_BTN D2 | |
#define READ_BIT(x,y) ((x & (1 << y)) ? 1:0) |
This file contains hidden or 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 <Arduino.h> | |
#define PIN_LED0 D8 | |
#define PIN_LED1 D7 | |
#define PIN_LED2 D6 | |
#define PIN_LED3 D5 | |
#define PIN_BTN D2 | |
const int pin_map[] = {PIN_LED0, PIN_LED1, PIN_LED2, PIN_LED3}; | |
int counter = 0; |
This file contains hidden or 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 <Arduino.h> | |
#define PIN_LED0 D8 | |
#define PIN_LED1 D7 | |
#define PIN_LED2 D6 | |
#define PIN_LED3 D5 | |
#define PIN_BTN D2 | |
const int pin_map[] = {PIN_LED0, PIN_LED1, PIN_LED2, PIN_LED3}; | |
int counter = 0; |
This file contains hidden or 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 <Arduino.h> | |
// https://github.com/adafruit/DHT-sensor-library | |
#include <Adafruit_Sensor.h> | |
#include <DHT.h> | |
#define DHTPIN D4 | |
#define DHT_TEMP_OFFSET (float)-2.19898 | |
#define DHT_HUMI_OFFSET (float)0.0 |
NewerOlder