Cov txheej txheem:

Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue): 5 Kauj Ruam
Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue): 5 Kauj Ruam

Video: Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue): 5 Kauj Ruam

Video: Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue): 5 Kauj Ruam
Video: Send Message With Arduino : SIM 900A GSM MODULE 2024, Hlis ntuj nqeg
Anonim
Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue)
Arduino Email Camera (VC0706 + 3G Shield + Arduino M0 Analogue)

Thaum kuv tau txais lub koob yees duab VC0706 hauv kuv txhais tes. Kuv ua tiav txuas nrog nws mus rau Arduino UNO, thaij duab, kaw nws ntawm micro SD. Kuv xav tau qee yam ntxiv - kom xa daim duab uas tau txais mus rau qhov chaw. Piv txwv, ntawm 3G/GPRS daim thaiv. Qhov yooj yim tshaj yog xa MMS. Tab sis tus nqi ntawm MMS yog siab heev. Kuv xav ua qee yam pheej yig dua. Piv txwv li, xa daim duab rau email.

Hauv phau ntawv qhia no, kuv yuav qhia koj yuav ua li cas txuas lub VC0706 lub koob yees duab thiab 3G/GPRS ntaub thaiv npog rau qhov sib piv Arduino M0, thaij duab thiab xa mus rau email.

Peb yuav xav tau: 1) Lub Koob Yees Duab VC0706

2) 3G/GPRS daim thaiv SIM5320

3) Sib piv Arduino M0

4) Micro SD

5) Hwj chim adapter 6-12V

6) Pin Angle txuas nrog 2.54 mm suab

7) Cov lus qhia ntawm cov xov hlau "poj niam"

Analogue Arduino M0 raug xaiv rau ntau qhov laj thawj:

  • Muaj cov khoom siv khoos phis tawj ntau dua - "Serial" (rau txuas lub koob yees duab), "Serial1" (rau txuas 3G/GPRS daim thaiv), "SerialUSB" (rau kev sib txuas lus nrog PC).
  • Cov qib ntawm cov laj thawj logic 3.3V - yooj yim rau kev txuas lub koob yees duab VC0706. Tab sis muaj teeb meem sib xws nrog qee qhov GPRS-shield, uas tau tsim rau qib 5V.
  • Lub xub ntiag ntawm lub motherboard txuas microSD txhawm rau txuas daim npav nco.
  • Ntau lub cim xeeb, ua haujlwm ntau dua thiab ntau dua.

Analogue Arduino M0 software tau tshaj nrog thawj Arduino M0. Kev kos duab rau Arduino UNO tau yooj yim yoog rau Arduino M0 kev sib piv.

Kauj Ruam 1: Npaj Lub Koob Yees Duab

Kev Npaj Lub Koob Yees Duab
Kev Npaj Lub Koob Yees Duab
Kev Npaj Lub Koob Yees Duab
Kev Npaj Lub Koob Yees Duab
Kev Npaj Lub Koob Yees Duab
Kev Npaj Lub Koob Yees Duab

Lub koob yees duab muaj qhov tso tawm RS-232 rau kev txuas ncaj qha rau PC. Nws yog qhov tsim nyog kom tshem tawm MAX232 (RS-232 hloov pauv) thiab kaw cov ntawv sib txuas ntawm cov koob sib xws 7-10 (TX), 8-9 (RX).

Rau-xaim cable uas tuaj nrog lub koob yees duab yuav tsum tau rov kho dua me ntsis:

  • Tshem ob lub xov hlau los ntawm qhov txuas.
  • Rearrange liab (+ 5V) thiab dub (GND) xov hlau raws li qhia hauv daim duab.

Ntawm qhov kawg ntawm cov xov hlau yuav tsum tau muab cov lus qhia ntxaws zoo li "poj niam".

Kauj Ruam 2: Kev Npaj Analog Arduino M0

Kev npaj ntawm Analog Arduino M0
Kev npaj ntawm Analog Arduino M0
Kev npaj ntawm Analog Arduino M0
Kev npaj ntawm Analog Arduino M0
Kev npaj ntawm Analog Arduino M0
Kev npaj ntawm Analog Arduino M0

Raws li tau hais dhau los, Analogue Arduino M0 yog kho vajtse thiab software sib xws nrog tus thawj Arduino M0, tab sis nws kuj tseem muaj lub onboard microSD txuas rau txuas daim npav nco.

Txhawm rau txuas lub koob yees duab mus rau Arduino M0 Analogue ntawm pawg thawj coj nws yog qhov tsim nyog yuav tsum tau muab cov kab txuas sib txuas rau lub dav hlau TXD, RXD (txuas X6) raws li qhia hauv daim duab. Qhov chaw nres nkoj no sib phim rau "Serial".

Dawb (Lub Koob Yees Duab RX) thiab daj (Lub koob yees duab TX) cov xov hlau los ntawm lub koob yees duab yuav tsum txuas nrog rau lub dav hlau ntawm TXD thiab RXD (txuas X6) raws li qhia hauv daim duab.

Koj yuav tsum ntxig daim npav nco (tsawg kawg 32MB) ua qauv hauv FAT32 hom rau hauv microSD qhov.

Kauj Ruam 3: Kev npaj 3G/GPRS Shield

Kev npaj ntawm 3G/GPRS Shield
Kev npaj ntawm 3G/GPRS Shield
Kev npaj ntawm 3G/GPRS Shield
Kev npaj ntawm 3G/GPRS Shield
Kev npaj ntawm 3G/GPRS Shield
Kev npaj ntawm 3G/GPRS Shield

Ua ntej txhim kho daim npav SIM hauv qhov, koj yuav tsum xiam tus lej PIN thov. Tom qab ntawd teeb tsa daim npav SIM hauv lub qhov rau sab hauv qab ntawm pawg thawj coj raws li qhia hauv daim duab.

Ob tus dhia yuav tsum tau teeb tsa hauv txoj haujlwm RX-1 (D1), TX-0 (D0).

Kauj ruam 4: Kawg Tsim

Kawg Tsim
Kawg Tsim
Kawg Tsim
Kawg Tsim
Kawg Tsim
Kawg Tsim
Kawg Tsim
Kawg Tsim

Rau qhov kev sib dhos zaum kawg nws yog qhov tsim nyog los txuas 3G/GPRS daim thaiv rau Arduino M0 kev sib piv.

Tom qab ntawd, peb txuas lub koob yees duab VC0706. Lub hwj chim ntawm lub koob yees duab (xaim liab "+ 5V" thiab xaim dub "GND") yuav tsum raug coj los ntawm "+ 5V" thiab "GND" cov dav hlau los ntawm 3G/GPRS daim thaiv npog. Koj tseem tuaj yeem siv lub kaum sab xis txuas rau qhov no.

Tsis txhob hnov qab txuas lub kav hlau txais xov 3G.

Kauj Ruam 5: Lub Tshuab Ntaus Ntawv

Ntaus Ntawv
Ntaus Ntawv
Ntaus Ntawv
Ntaus Ntawv
Ntaus Ntawv
Ntaus Ntawv

Ua ntej tshaj plaws, nws yog qhov yuav tsum tau teeb tsa lub tsev qiv ntawv rau ua haujlwm nrog lub koob yees duab VC0706 thiab rau kev ua haujlwm nrog Xmodem (xa cov duab mus rau 3G/GPRS daim ntaub thaiv):

github.com/Seeed-Studio/Camera_Shield_VC0706

peter.turczak.de/XModem.zip

Ua tib zoo: hauv cov tsev qiv ntawv ua haujlwm nrog lub koob yees duab VC0706_UART.h nws yog qhov tsim nyog los tawm tswv yim tawm cov kab hauv qab no:

// # suav nrog "SoftwareSerial.h"

thiab teeb tsa qhov tseem ceeb:

#define DEBUG 0

#define USE_SOFTWARE_SERIAL 0

#define TRANSFER_BY_SPI 0

Tom ntej no, koj yuav tsum xa mus rau pawg thawj coj saib kev sib tham Arduino M0 zog 6-12V. Txuas micro USB cable.

Tua tawm Arduino IDE. Qhib tus duab kos EmailCamera.ino.

Xaiv hauv qhov chaw "Cov cuab yeej-> Pawg:" Arduino M0 Pro (Native USB Port) "".

Hauv qhov kos duab nws yog qhov yuav tsum tau sau npe cov kab hauv qab no (tsis yog '*'):

const char smtp_server = "*****"; // SMTP neeg rau zaub mov

const char smtp_user_name = "*****"; // SMTP tus neeg siv lub npe

const char smtp_password = "*****"; // SMTP tus password

const char smtp_port = "***"; // SMTP server chaw nres nkoj

// Sau koj li SIM cov ntaub ntawv

cons char apn = "*****";

const char user_name = "***";

const char password = "***";

// Sau koj cov ntaub ntawv hais txog tus xa, qhia thiab npe

const char sender_address = "*****"; // Chaw nyob xa ntawv

const char sender_name = "*****"; // Sender npe

const char to_address = "*****"; // Tus neeg txais chaw nyob

const char to_name = "*****"; // Tus neeg txais lub npe

Tshem lub koob yees duab npog los ntawm lub lens. Peb coj lub koob yees duab mus rau qhov khoom uas tau yees duab. Lau qhov Serial Monitor. Nyem rau lub pob "Upload", sau cov duab kos, teeb tsa lub rooj tsavxwm. Hauv Serial Monitor peb saib cov ntaub ntawv debug. Tom qab ua tiav kev ua tiav, txheeb xyuas tus neeg txais email.

Kuv xav qhia kuv qhov kev pab zoo hauv kev tsim cov duab kos:

Adafruit Kev Lag Luam, www.seeedstudio.com, www.cooking-hacks.com, Limor Fried, Tom Igoe, Peter Turczak.

Ob peb hnub kuv npaj yuav ua thiab tshaj tawm cov vis dis aus nrog kev qhia ua haujlwm. Thaum ua haujlwm, pom muaj qhov tsis xws nyob hauv Xmodem lub tsev qiv ntawv (tsis yog qhov tseem ceeb rau cov lus qhia no).

Yav tom ntej, muaj lub tswv yim rau kev qhia tshiab: ntxiv lub suab ntsuas lub zog ua haujlwm nrog kev pov npav cyclic thiab xa duab.

Ua tsaug rau koj saib.

Pom zoo: