ARDUINO LED TEST CİHAZI: 5 Adım

ARDUINO LED TEST CİHAZI: 5 Adım

İçindekiler:

Anonim

Küçük bir LED test projesi

Bir LED test cihazı için NET'e bakıyordum ve bir fikir gördükten sonra bu test cihazını sıfırdan kurmak istedim

Gereçler:

Adım 1: Şema

Bir LED'i test etmek için bir akım jeneratörüne ihtiyacınız var.

LM317LZ veri sayfası bir harita sağlar, Temel fikir web sitesine bakın

www.robotroom.com/LED-Tester-Pro-1.html

bu siteden kod yok

Bu nedenle ilke, LED terminallerinde birkaç voltaj ölçmektir.

VH anot gerilimi VL katot gerilimi ve çıkarılması (VH - VL)

daha sonra LED IL akımının geçtiği ve R (VR / R = IL) değerine bölünen direncin terminalindeki voltajı ölçmek için

Adım 2: Kod Arduino

Arduino kodu için temel fikir tanımlanmıştı. OLED ekranında bir ekran istedim.

kütüphane bir ssd1306 içindir

github.com/adafruit/Adafruit_SSD1306

Farklı voltajları ölçmek için bkz.

http: //www.instructables.com/id/Arduino-OLED-Volt …

Farklı menü seçenekleri için bkz.

it-edukacija.eu.hr/multidruino/default.html

Simgeler oluşturmak için

javl.github.io/image2cpp/

testi bir test tahtasına geçtik

kod burada:

// ================================================

// Yazar: PHILOUPAT

// Mars 2019 // sürüm 1: bir düğme, OLED I2C ekran modları, varsayılan AREF // ================================= ===================

// I2C OLED EKRAN: SCL = A5, SDA = A4

// RL hesaplaması için A0 giriş referansı

// A1 girişi Vbat

// A2 girişi VL

// A7 giriş VH

// ================================================

#Dahil etmek

#Dahil etmek

#Dahil etmek

#Dahil etmek

#Dahil etmek

#Dahil etmek

#define SSD1306_128_64

#define SCREEN_WIDTH 128

// OLED ekran genişliği, piksel cinsinden

#define SCREEN_HEIGHT 64

// OLED ekran yüksekliği, piksel cinsinden

// I2C'ye bağlı bir SSD1306 ekran için bildirim (SDA, SCL pinleri)

#define OLED_RESET -1 // Reset pin # (veya Arduino reset pinini paylaşıyorsa -1)

Adafruit_SSD1306 görüntüleme (SCREEN_WIDTH, SCREEN_HEIGHT ve & Wire, OLED_RESET);

#define XPOS 0

#define YPOS 1

#define DELTAY 2

// # eğer (SSD1306_LCDHEIGHT! = 64)

// # error ("Yükseklik yanlış, lütfen Adafruit_SSD1306.h!" düzeltin));

// # endif

const imzasız karakter PROGMEM batterie = {

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x03, 0xe0, 0x20, 0x00, 0x00, 0x02, 0x20, 0x24, 0x00, 0x00, 0x82, 0x20, 0x24, 0x00, 0x01, 0xe2, 0x20, 0x24, 0x00, 0x00, 0x82, 0x20, 0x20, 0x00, 0x00, 0x82, 0x20, 0x20, 0x00, 0x00, 0x03, 0xe0, 0x20, 0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x3f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

const imzasız karakter PROGMEM resis = {

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x07, 0xfe, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x03, 0xff, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x ff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

const imzasız karakterleri PROGMEM = {

0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x18, 0x18, 0x18, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x18, 0x0c, 0x08, 0x18, 0x0c, 0x30, 0x06, 0x30, 0x1e, 0x3c, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x00};

const imzasız karakter PROGMEM led = {

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x01, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x00, 0x03, 0xff, 0xff, 0x80, 0x03, 0xff, 0xff, 0x80, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff0 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x07, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf7, 0xff, 0xf0, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xf8, 0x0f, 0xcf, 0xfe, 0xf0, 0xff, 0xf8, 0x0f, 0xcf, 0xfe 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x01, 0xe0, 0x0e, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xe0, 0x0e, 0x00, 0x00, 0xc0, 0x0e, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

const imzasız karakter accueil PROGMEM = {

0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xe1, 0xd8, 0xc3, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0xc1, 0xd9, 0x83, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe6, 0xff, 0xf9, 0x83, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xe1, 0xb9, 0x83, 0xff, 0xff8, 0xf1, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc4, 0xf9, 0xb1, 0xa3, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x83, 0xf3, 0x07, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x83, 0x73, 0x0f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xf3, 0xf8, 0x02, 0x03, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe3, 0xf8, 0x06, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xff, 0xe3, 0xf1, 0xfc, 0x30, 0xff, 0xff, 0xff, 0xff, 0x ff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xe3, 0xf1, 0xfc, 0x78, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xf3, 0xbc, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xe0, 0x1c, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x04, 0x00, 0x0f, 0xff, 0xc7, 0xe0, 0x3c, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0xcf, 0xe1, 0xfc 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x07, 0xff, 0x8f, 0xe3, 0xf8, 0x7c, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x07, 0xff, 0x8f, 0xc7, 0xf8, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x07, 0xff, 0x8f, 0xc7, 0xf8, 0xf0, 0x07, 0xff, 0x8f, 0xc7, 0xf8 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0x88, 0x07, 0x88, 0x60, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 0x08, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf1, 0xf9, 0xff, 0xcf, 0xff, 0x80, 0x00, 0x08, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xe0, 0x1c, 0x01, 0xc0, 0xe0, 0x1c, 0x01, 0x0f, 0x18, 0x07, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x80, 0x04, 0x03, 0x00, 0x00, 0x04, 0x01, 0x1f, 0x98, 0x03, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x88, 0x88, 0xfe, 0x1e, 0x00, 0x40, 0xff, 0x1f, 0x90, 0xe1, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x38, 0xf8, 0xfe, 0x3f, 0xb8, 0xf8, 0xfe, 0x1f, 0x91, 0xe1, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xf9, 0xf8, 0xfe, 0x3f, 0xf8, 0xf8, 0xfe, 0x3f, 0x91, 0xc3, 0xff, 0xff, 0x1f, 0xf9, 0x91, 0xc3, 0xff, 0xf1, 0xf0, 0x0f, 0x07, 0xf8, 0xf8, 0x0e, 0x3f, 0x93, 0x87, 0xff, 0xff, 0x1f, 0xf9, 0xff, 0xff, 0xf0, 0xf0, 0x1f, 0xc1, 0xf8, 0xf0, 0xf0, 0x1f, 0xa0, 0x0f, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xf1, 0xf0, 0xff, 0xf8, 0x70, 0xf0, 0xfe, 0x3f, 0x20, 0x1f, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xf1, 0xff, 0xfc, 0x71, 0xf1, 0xfe, 0x3f, 0x20, 0x0f, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xe1, 0xe3, 0xfd, 0xfc, 0x71, 0xf1, 0xfe3, 0x23, 0xff, 0xff, 0xbf, 0xf9, 0xff, 0xff, 0xe1, 0xe3, 0xfc, 0xf8, 0x61, 0xe3, 0xfe, 0x1e, 0x63, 0x87, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xe1, 0xe3, 0xfc, 0x00, 0x61, 0xe1, 0xc6, 0x00, 0x63, 0xc7, 0xff, 0xff, 0x9f, 0xf9, 0xff, 0xff, 0xe1, 0xe0, 0x04, 0x00, 0xe1, 0xe0, 0x07, 0x00, 0xe3, 0xc3, 0xff, 0xe0, 0x9f, 0xf9, 0xff, 0xff, 0xe1, 0xe0, 0x07, 0x03, 0xe1, 0xe0, 0x07, 0x01, 0xc3, 0xc3, 0xff, 0xff, 0x 9f, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

int modu = 0;

int duraklama = 500;

int RL = 0;

int R1 = 10000;

int R2 = 10000;

int R3 = 47;

ham yüzdürme = 0;

şamandıra val = 0;

şamandıra ref = 0;

şamandıra vbat = 0;

şamandıra vin = 0.00;

şamandıra voutL = 0.00;

şamandıra voutH = 0.00;

şamandıra vref = 0.00;

şamandıra girişi = 0.00;

şamandıra vr = 0.00;

şamandıra IL = 0.00;

şamandıra vinref = 0.00;

şamandıra vinbat = 0;

geçersiz kurulum ()

{

pinMode (5, INPUT_PULLUP);

pinMode (4, INPUT_PULLUP);

pinMode (3, INPUT_PULLUP);

attachInnterrupt (1, bouton, FALLING);

// varsayılan olarak, 3.3v hattından dahili olarak yüksek voltaj üreteceğiz! (temiz!) display.begin (SSD1306_SWITCHCAPVCC, 0x3C); // I2C addr 0x3C ile başlatınız (128x32 için)

}

geçersiz döngü ()

{

şamandıra vref = readVcc () / 1000.0;

val = analog Okuma (A7);

raw = analog Okuma (A2);

voutH = (val * vref) / 1024.0; // metni gör

voutL = (ham * vref) / 1024.0;

eğer (voutL> 0)

{

if (mode == 0) // caracteristique açtı

{

şamandıra vref = (readVcc () / 1000.0);

val = analog Okuma (A7);

raw = analog Okuma (A2);

ref = analog Okuma (A0);

voutH = (val * vref) / 1024.0; // metni gör

voutL = (ham * vref) / 1024.0;

kanatlı = (voutH-voutL) * (R1 + R2) / R2;

vr = voutL;

IL = vr / R3;

display.clearDisplay ();

display.setTextColor (BEYAZ);

display.drawBitmap (96, 0, led, 32, 64, 1);

display.setFont ();

display.setFont (ve FreeSans9pt7b);

display.setCursor (0,12);

display.print ("LED özelliği");

display.setCursor (0,35);

display.print ("VH");

display.setCursor (28,35);

display.print (VLED);

display.setCursor (72,35);

display.print ("V");

display.setCursor (0,60);

display.print ("IL");

display.setCursor (28,60);

display.print (IL x 1000);

display.setCursor (75,60);

display.print ("mA");

display.display ();

gecikmesi (ara);

}

Eğer (mod == 1)

{// direnç

şamandıra vref = (readVcc () / 1000.0);

val = analog Okuma (A7);

raw = analog Okuma (A2);

ref = analog Okuma (A0);

voutH = (val * vref) / 1024.0;

voutL = (ham * vref) / 1024.0;

vinref = (ref * vref * 2) / 1024.0;

kanatlı = (voutH-voutL) * (R1 + R2) / R2;

IL = voutL / R3;

RL = (vinref girişli) / IL;

display.clearDisplay ();

display.drawBitmap (96, 0, resis, 32, 64, 1);

display.setFont ();

display.setFont (ve FreeSans9pt7b);

display.setCursor (0,12);

display.print ("Resistance");

display.setCursor (0,35);

display.print ("Vin:");

display.setCursor (32,35);

display.print (vinref);

display.setCursor (75,35);

display.print ("V");

display.setCursor (0,60);

display.print ("RL");

Eğer (RL <0)

{

display.setCursor (30,60);

display.print ("boş");

}

Başka

{

display.setCursor (30,60);

display.print (RL);

display.drawBitmap (73, 46, oms, 15, 15, 1);

}

display.display ();

gecikmesi (ara);

}

Eğer (mod == 2)

{// baterie

şamandıra vref = (readVcc () / 1000.0);

vbat = analog Okuma (A1);

vinbat = (vbat * vref * 2.3) / 1024.0;

isplay.clearDisplay ();

display.drawBitmap (90, -2, batterie, 36, 21, 1);

display.setFont ();

display.setFont (ve FreeSans9pt7b);

display.setCursor (0,14);

display.print ("Batterie:");

//display.fillRect(10,35,90,20,WHITE);

//display.fillRect(12,37,88,18,BLACK);

display.drawRoundRect (15, 40, 95, 24, 8, BEYAZ);

display.setCursor (0,35);

display.print ("Vbat:");

display.setCursor (50,35);

display.print (vinbat);

display.setCursor (90,35);

display.print ("V");

eğer (vinbat> 0 && vinbat <7,0)

{// bir çubuk

display.fillRect (20,45,10,15, SİYAH);

}

aksi takdirde (vinbat> 7.0 ve& vinbat <7.8)

{// iki çubuk

display.fillRect (20,45,10,15, SİYAH);

display.fillRect (30,45,5,15, beyaz);

display.fillRect (35,45,10,15, SİYAH);

}

başka eğer (vinbat> 7.8 && vinbat <8.4)

{// üç çubuk

display.fillRect (20,45,10,15, SİYAH);

display.fillRect (30,45,5,15, beyaz);

display.fillRect (35,45,10,15, SİYAH);

display.fillRect (45,45,5,15, beyaz);

display.fillRect (50,45,10,15, SİYAH);

}

aksi takdirde (vinbat> 8.4 && vinbat <8.7)

{// dört çubuk

display.fillRect (20,45,10,15, SİYAH);

display.fillRect (30,45,5,15, beyaz);

display.fillRect (35,45,10,15, SİYAH);

display.fillRect (45,45,5,15, beyaz);

display.fillRect (50,45,10,15, SİYAH);

display.fillRect (60,45,5,15, beyaz);

display.fillRect (65,45,10,15, SİYAH);

}

başka eğer (vinbat> 8.7 ve& vinbat <9.0)

{// beş çubuk

display.fillRect (20,45,10,15, SİYAH);

display.fillRect (30,45,5,15, beyaz);

display.fillRect (35,45,10,15, SİYAH);

display.fillRect (45,45,5,15, beyaz);

display.fillRect (50,45,10,15, SİYAH);

display.fillRect (60,45,5,15, beyaz);

display.fillRect (65,45,10,15, SİYAH);

display.fillRect (75,45,5,15, beyaz);

display.fillRect (80,45,10,15, SİYAH);

}

başka bir durumda (vinbat> 9.0 ve& vinbat <9.4)

{

display.fillRect (20,45,10,15, SİYAH);

display.fillRect (30,45,5,15, beyaz);

display.fillRect (35,45,10,15, SİYAH);

display.fillRect (45,45,5,15, beyaz);

display.fillRect (50,45,10,15, SİYAH);

display.fillRect (60,45,5,15, beyaz);

display.fillRect (65,45,10,15, SİYAH);

display.fillRect (75,45,5,15, beyaz);

display.fillRect (80,45,10,15, SİYAH);

display.fillRect (90,45,5,15, beyaz);

display.fillRect (95,45,10,15, SİYAH);

}

display.display (); gecikmesi (ara); }

}Başka

{

display.clearDisplay ();

display.drawBitmap (0, 0, accueil, 128, 64, 1);

display.display ();

gecikmesi (700);

display.display ();

Gecikme (1000);

}

}

geçersiz bouton ()

{

statik işaretsiz uzun last_interrupt_time = 0;

işaretsiz uzun interrupt_time = millis ();

// Kesintiler 200 msn'den daha hızlı gelirse, bunun bir sıçrama olduğunu varsay ve yoksay

if (interrupt_time - last_interrupt_time> 220) {

modu ++;

tonu (6,2250,50);

Eğer (modu> 2)

mode = 0;

}

last_interrupt_time = interrupt_time;

}

uzun readVcc ()

tanımlı (__ AVR_ATmega2560__) ADMUX = _BV (REFS0)

Adım 3: Gerçekleşme

Şema ve PCB. Shift ve pcb'yi gerçekleştirmek için EAGLES kullanıyorum

üretim için iyi bir site

jlcpcb.com/

Malzemenin listesi:

-1 Arduino mini yanlısı 5v

http: //www.banggood.com/Wholesale-New-Ver-Pro-Min …

-1. 0.96 inç OLED Modülü 12864 128x64 Sarı Mavi SSD1306 Sürücü I2C Seri Arduino Ahududu PI veya diğer için Kendinden Aydınlıklı Ekran Kartı

polarite uyarısı Gnd Vcc veya Vcc Gnd

http: //www.amazon.com/UCTRONICS-SSD1306-Self-Lumi …

http: //www.ebay.fr/itm/0-96-I2C-IIC-SPI-Serial-12 …

-1 LM317 LZ

http: //www.ebay.fr/itm/5Pcs-LM317LZ-LM317L-LM317 -…

http: //www.amazon.com/LM317LZ-Voltage-Regulator-I …

-1 MCP1702 5V

http: //www.ebay.fr/itm/Microchip-MCP1702-500-TO-9 …

http: //www.amazon.com/5002E-MCP1702-1702-5002E-MC …

-2x10K 2x470K 2x 47R 1/8 W

-1x500R değişkeni TSR3386F 3/8

http: //www.ebay.fr/itm/Suntan-TSR3386F-3-8-1-turn …

-1x10K değişken TSR3386F 3/8

http: //www.ebay.fr/itm/Suntan-TSR3386F-3-8-1-turn …

-1xsitch açma / kapama SS12D00G4 SPDT 1P2T 2 Pozisyon 3 Pimli PCB

http: //www.ebay.fr/itm/20pcs-SS12D00G4-SPDT-1P2T -…

-2x 1µF tantale

-3x100nF

-1x1N4148

9V batarya veya batarya lipo 3.7V Olası Güç

-1x3.7 V 9 V 5 V 2A Ayarlanabilir Step Up 18650 Lityum Pil Şarj Deşarjı Entegre Modülü

http: //www.banggood.com/3pcs-3_7V-9V-5V-2A-Adjust …

-1xLIPO pil 3.7V 400mAh

http: //www.ebay.fr/itm/Batterie-403035-Lipo-3-7v -…

4. Adım: Kod Yükleme ve Test Etme ve Kutuya Alma

Kodu yüklemek için FTDI kullanın.

ve farklı LED'ler ve diyotlarla test edin

kutu 3d baskı yapmak

bir şeye gitme:

www.thingiverse.com/thing:3594143

toplanmış ve keyfini çıkarın

Bu proje birkaç yazılımı kullanır bu nedenle iyi bir Eğitim chalenge pcb kodu 3d elektronik hesap makinesi vb

Adım 5: