Skip to content

Instantly share code, notes, and snippets.

View Shofuuu's full-sized avatar

Muh. Shofuwan Anwar Shofuuu

View GitHub Profile
// Output dan Input
// Pengaturan mode digital -> pinMode
// Baca input digital -> digitalRead
// Tulis output digital -> digitalWrite
// Define itu artinya istilah
#define PIN_LED 13
#define PIN_BUTTON 2
int value = 0;
#include <Arduino.h>
struct PID_Parameters {
int16_t present_value;
int16_t motor[2];
int16_t set_point;
uint8_t sensors;
float new_error;
float prev_error;
@Shofuuu
Shofuuu / bin2dec.c
Created October 3, 2022 09:17
Tools for converting binary to decimal in c programming
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int _pow(int x, int y);
int main(int argc, char **argv){
if(argc < 2) perror("[Err:argc] Please give at least one input!\r\n");
else{
int len = strlen(argv[1]);
#include <Arduino.h>
#include <LiquidCrystal_I2C.h>
#include <CayenneMQTTESP32.h>
/***** Cayenne Data *****/
const char wifi_ssid[] = "0xFFE28C";
const char wifi_password[] = "1010110011101101";
const char mqtt_username[] = "be5a4b90-3893-11ed-bf0a-bb4ba43bd3f6";
const char mqtt_password[] = "dedee67f2653d5e4bea03ffe3dcd30dee2305e48";