Orodha ya maudhui:

Mfuatiliaji na Msajili wa Msajili: Hatua 5
Mfuatiliaji na Msajili wa Msajili: Hatua 5

Video: Mfuatiliaji na Msajili wa Msajili: Hatua 5

Video: Mfuatiliaji na Msajili wa Msajili: Hatua 5
Video: Раскрываю секрет вкусного шашлыка от А до Я. Шашлык из баранины 2024, Novemba
Anonim
Mfuatiliaji na Msajili wa Msajili
Mfuatiliaji na Msajili wa Msajili
Mfuatiliaji na Msajili wa Msajili
Mfuatiliaji na Msajili wa Msajili

Mradi huu umetengenezwa kwa kuhesabu mfuatiliaji wa instagram na mteja wa youtube..

jukwaa hutumiwa:

Chatu

Arduino

Hatua ya 1: Vifaa / Zana:

Vifaa / Zana
Vifaa / Zana
Vifaa / Zana
Vifaa / Zana
  • Arduino uno
  • Lcd Ngao
  • Cable ya programu
  • Windows PC

Hatua ya 2: Unda Funguo za Api

Unda Funguo za Api
Unda Funguo za Api
Unda Funguo za Api
Unda Funguo za Api

Kwa instagram Api

NENDA KWENYE Wavuti Hii:

na kushinikiza kutoa ishara ya ufikiaji

Kwa youtube Api

Unaweza Kufuata Hatua Kutoka kwa wavuti hii: https://www.slickremix.com/docs/get-api-key-for-yo …….

Hatua ya 3: Pakia Mchoro kwa Arduino

Pakia Mchoro kwa Arduino
Pakia Mchoro kwa Arduino
Pakia Mchoro kwa Arduino
Pakia Mchoro kwa Arduino

Unaweza Kupakua Nambari na Programu Kutoka Ukurasa Wangu wa Github:

github.com/ayberkeren/social-media-counter

Msimbo wa Arduino:

# pamoja

Kamba youtube_name = ""; // jina lako la youtube Kamba youtube_token = ""; // ishara yako ya youtube Kamba ya instagram_token = ""; // ishara yako ya instagram isiyosainiwa KUCHELEWA kwa muda mrefu = 10; // kuchelewa kati ya skrini (sekunde) // weka pini za skrini za lcd const int rs = 8, en = 9, d4 = 4, d5 = 5, d6 = 6, d7 = 7; LiquidCrystal LCD (rs, sw, d4, d5, d6, d7); // tengeneza vigeu ambavyo havikusainiwa mfuasi mrefu = 0, mfuasi2 = 0, msajili = 0, msajili2 = 0, x = millis (); // tengeneza ka kwa nembo byte instagram1 [8] = {0b00000, 0b01111, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b11111}; byte instagram2 [8] = {0b00000, 0b11111, 0b00000, 0b00000, 0b00000, 0b00000, 0b01110, 0b10001}; byte instagram3 [8] = {0b00000, 0b11110, 0b00001, 0b11001, 0b11001, 0b00001, 0b00001, 0b11111}; byte instagram4 [8] = {0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b01111}; byte instagram5 [8] = {0b10001, 0b10001, 0b01110, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111}; byte instagram6 [8] = {0b00001, 0b00001, 0b00001, 0b00001, 0b00001, 0b00001, 0b00001, 0b11110}; byte youtube1 [8] = {0b11111, 0b11100, 0b11000, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000}; byte youtube2 [8] = {0b11111, 0b00000, 0b10000, 0b11000, 0b11100, 0b11110, 0b11111, 0b11111}; byte youtube3 [8] = {0b11111, 0b00111, 0b00011, 0b00001, 0b00001, 0b00001, 0b00001, 0b10001}; Byte youtube4 [8] = {0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b11000, 0b11100, 0b11111}; byte youtube5 [8] = {0b11111, 0b11111, 0b11110, 0b11100, 0b11000, 0b10000, 0b00000, 0b11111}; byte youtube6 [8] = {0b10001, 0b00001, 0b00001, 0b00001, 0b00001, 0b00011, 0b00111, 0b11111}; kuanzisha batili () {lcd.anza (16, 2); // kuanza lcd Serial. kuanza (9600); // kuanza ucheleweshaji wa mawasiliano ya serial (2000); Serial.println (youtube_name); // sema vigeugeu kwa ucheleweshaji wa programu (1000); Serial.println (youtube_token); // sema vigeugeu kwa ucheleweshaji wa programu (1000); Serial.println (instagram_token); // sema vigeu vya programu}

kitanzi batili () {

ikiwa (x <(DELAY * 1000)) {drawinstagram (); lcd.setCursor (5, 1); lcd.print (mfuasi); wakati (x0) {follower2 = Serial.parseInt (); msajili2 = Serial.parseInt (); } x = milimita (); x = x% (KUCHELEWA * 2000); } msajili = msajili2; mfuasi = mfuasi2; }

mwingine {drawyoutube (); lcd.setCursor (5, 1); lcd.print (msajili); wakati (x> = (Kuchelewesha * 1000) && msajili2 == msajili) {wakati (Serial.available ()> 0) {follower2 = Serial.parseInt (); msajili2 = Serial.parseInt (); } x = milimita (); x = x% (KUCHELEWA * 2000); } msajili = msajili2; mfuasi = mfuasi2; }}

// chora nembo ya instagram

batili drawinstagram () {lcd.createChar (0, instagram1); lcd.createChar (1, instagram2); lcd.createChar (2, instagram3); lcd.createChar (3, instagram4); lcd.createChar (4, instagram5); lcd.createChar (5, instagram6); lcd wazi (); lcd.setCursor (1, 0); lcd.andika (byte (0)); andika lcd (byte (1)); andika lcd (byte (2)); lcd.setCursor (1, 1); andika lcd (byte (3)); andika lcd (byte (4)); andika lcd (byte (5)); lcd.setCursor (5, 0); lcd.print ("Wafuasi"); }

// kuteka youtubelogo

batili drawyoutube () {lcd.createChar (6, youtube1); lcd.createChar (7, youtube2); lcd.createChar (8, youtube3); lcd.createChar (9, youtube4); lcd.createChar (10, youtube5); lcd.createChar (11, youtube6); lcd wazi (); lcd.setCursor (1, 0); andika lcd (byte (6)); andika lcd (byte (7)); lcd.andika (byte (8)); lcd.setCursor (1, 1); andika lcd (byte (9)); lcd.andika (byte (10)); lcd.andika (byte (11)); lcd.setCursor (5, 0); lcd.print ("Wasajili"); }

Hatua ya 4: Chatu

Chatu
Chatu
Chatu
Chatu

Nilifanya mpango wa chatu 2 moja ya hizo zina kielelezo cha kielelezo cha mtumiaji nyingine inafanya kazi tu kwenye bash

unaweza kutumia zote mbili kwa kweli wanafanya vitu sawa.

unapaswa kuchagua ni bandari gani uliyochomeka arduino kutoka kwenye orodha na bonyeza kitufe cha kuchagua.

na UMEKWISHA….

Pakua Programu kutoka kwa Github Yangu:

na misimbo iko chini ……

Hatua ya 5: UMEFANYA…

Ilipendekeza: