Skip to content

Instantly share code, notes, and snippets.

View PetraSitompul's full-sized avatar

PetraSitompul

View GitHub Profile
@PetraSitompul
PetraSitompul / Kodingan Arduino EMG
Last active December 15, 2025 09:29
Kodingan Arduino EMG
// ======================== KONFIGURASI PIN & SAMPLING ========================
#define EMG_INPUT_PIN A0
#define EMG_SAMPLE_RATE 1000 // Hz - HARUS SAMA DENGAN VB.NET
#define ADC_REFERENCE_VOLTAGE 5.0 // Volt
#define ADC_RESOLUTION 1023.0 // 10-bit ADC
// ======================== PARAMETER PEMROSESAN SINYAL ========================
const float SOFTWARE_GAIN = 1.5; // Penguatan software (turun dari 3.0)
const float DC_OFFSET = 2.5; // DC offset (setengah dari Vref)
const float MAX_SAFE_VALUE = 500.0; // Batas aman (turun dari 2000.0)
Imports System.Linq
Imports System.Data.SqlClient
Imports System.Data.OleDb
Imports Microsoft.Office.Core
Imports Excel = Microsoft.Office.Interop.Excel
Imports ExcelAutoFormat = Microsoft.Office.Interop.Excel.XlRangeAutoFormat
Imports Microsoft.Office.Interop
Imports System.IO
Imports System.Xml.XPath
Imports System.Data
Imports System.Data
Imports System.Data.SqlClient
Public Class FormBiodata
' Added responsive scaling variables
Private originalFormSize As Size
Private originalControlBounds As New Dictionary(Of String, Rectangle)
Private originalFontSizes As New Dictionary(Of String, Single)
Private isInitialized As Boolean = False
Imports System.Data.SqlClient
Imports System.Drawing ' Tambahkan ini untuk Size, Point, Rectangle, Font
Imports System.Windows.Forms ' Tambahkan ini jika belum ada
Public Class FormLogin
' === Variabel untuk Responsive Scaling (Disalin dari FormBiodata) ===
Private originalFormSize As Size
Private originalControlBounds As New Dictionary(Of String, Rectangle)
Private originalFontSizes As New Dictionary(Of String, Single)