Skip to content

Instantly share code, notes, and snippets.

View IgorDePaula's full-sized avatar
😆

Igor C. de Paula IgorDePaula

😆
View GitHub Profile
#include <ESP32Servo.h>
// TOUCH SENSORS
#define TOUCH1 4 // T0 (GPIO 4)
#define TOUCH2 27 // T7 (GPIO 27)
// SERVOS
static const int servoPin = 18;
static const int servoPin2 = 19;
<?php
Forms\Components\TextInput::make('zipcode')->label('CEP')->mask('99999-999')->suffixAction(fn($state, Forms\Set $set) => Forms\Components\Actions\Action::make('search-action')
->icon('heroicon-o-magnifying-glass')
->action(function () use ($state, $set) {
$cepData = static::getCountryData($state);
$set('address', $cepData['logradouro'] ?? null);
$set('neighborhood', $cepData['bairro'] ?? null);
$set('complement', $cepData['complemento'] ?? null);
@IgorDePaula
IgorDePaula / PlatformIO_Setup_Ubuntu.md
Created October 31, 2025 17:58 — forked from thetrung/PlatformIO_Setup_Ubuntu.md
Setup PlatformIO + CH32v / Ubuntu 24.04.1

How to setup PlatformIO & CH32 on Ubuntu 24.04.1

  1. Setup
  • Don't use sudo apt install platformio but if you did, try sudo apt remove platformio before proceeding further.

  • Install python-venv :

    sudo apt-get install python3-venv
    
  • Install PlatformIO :

#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include <SSD1306.h>
#include <RTClib.h>
#include <WiFi.h>
#include "LoRa.h"
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
@IgorDePaula
IgorDePaula / main.tf
Created October 23, 2025 22:38
Cria lambda com ecr no terraform
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.82.1"
}
}
}
// Used by get the current aws number account.
data "aws_caller_identity" "current" {
#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include <SSD1306.h>
#include <RTClib.h>
#include <WiFi.h>
#include "LoRa.h"
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
@IgorDePaula
IgorDePaula / main.ino
Created October 19, 2025 17:05
update firmware via aws
/*
* ESP32 AWS IoT Jobs OTA - Arduino IDE
*
* Bibliotecas necessárias (instalar via Library Manager):
* - ArduinoJson by Benoit Blanchon
*
* Board: ESP32 Dev Module
* Partition Scheme: Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
*/
@IgorDePaula
IgorDePaula / main.ino
Created October 18, 2025 10:25
lora2
#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include <SSD1306.h>
#include <RTClib.h>
#include <WiFi.h>
#include "LoRa.h"
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
@IgorDePaula
IgorDePaula / esp.ino
Last active October 18, 2025 23:51
funcionando com o lora anterior
#include <SPI.h>
#include <SD.h>
#include <Wire.h>
#include <SSD1306.h>
#include <RTClib.h>
#include <WiFi.h>
#include "LoRa.h"
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
/*
* Script Simples para Comunicação LoRa
* Heltec ESP32 V2 LoRa - Usando bibliotecas padrão
* Alternativa ao heltec.h para evitar erros de compilação
*/
#include <SPI.h>
#include <U8g2lib.h>
#include "LoRa.h"
#include <BLEDevice.h>