Cov txheej txheem:
- Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
- Kauj ruam 2: Circuit Court Assembly
- Kauj Ruam 3: Xeem
- Kauj Ruam 4: Cov Kauj Ruam Tom ntej
Video: IOT123 - 5PIN ATTINY85 NRF24L01 BRICK: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hloov tshiab: Qhov teeb tsa no feem ntau yog kev kawm lossis lub hauv paus rau kev sim software/fais fab mov. Txawm hais tias thaum PB5 yog neeg xiam oob qhab raws li RESET, nws tsis nyeem qhov tseem ceeb raug siv analogRead: rooj plaub siv tseem ceeb rau kev nyeem ntawv sensor. Yuav saib mus rau ATTINY84 teeb tsa…
IOT123 BRICKS yog chav DIY modular uas tuaj yeem sib xyaw nrog lwm IOT123 BRICKS, txhawm rau ntxiv kev ua haujlwm rau ntawm qhov chaw lossis hnav tau. Lawv tau ua raws li lub xwmfab nti, ob-tog protoboards nrog sib cuam tshuam los ntawm qhov.
Qhov BRICK no ntxiv 2.4GHz RF txuas rau tus tswv rau IOT node cov ntaub ntawv sib sau ua ke. Nws tsis hloov pauv tau zoo li nws tsuas yog muab ib tus pin, tab sis nws yog qhov pib zoo thiab muaj zog ntau dua li 3Pin Circuit uas kuv tab tom mus rau.
Qhov BRICK no yuav muaj roj teeb BRICK, POWER BRICK thiab BREAKOUT BRICK tsim los uas tuaj yeem siv tau los yog lub taub hau koom nrog.
Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
Muaj Daim Ntawv Teev Npe Tag Nrho ntawm Cov Khoom thiab Sourcing.
- nRF24L01+ (1)
- 1 "Ob tog ob tog protoboard (1)
- ATTINY85-20PU (1)
- 8 Pin DIL IC Qhov (1)
- Poj Niam Headers (2x4P, 1P, 2P)
- Hookup hlau (~ 8)
- Cov laug thiab hlau (1)
- Muaj zog Cyanoachrylate Adhesive (1)
Kauj ruam 2: Circuit Court Assembly
Cov plaub fab ntxoov ntxoo daj yog cov haujlwm uas yuav siv tau rau kev txuas tom qab, yog li sim thiab ua kom lawv tsis txhob xaim.
Yog tias siv 40P header strips, txiav thiab sau 1P thiab 2P headers, tseem ua rau 2x4P (los ntawm 2 cais 4P's).
Muaj qee qhov xwm txheej uas qhov muag ntawm lwm sab ntawm lub qhov los ntawm qhov raug thaiv. Thaum qhov no yog qhov xwm txheej, Kuv tau muab lub dob tso rau ntawm lub hom phiaj los ntawm lub qhov, tom qab ntawd los ntawm sab sab yaj cov laug thiab thawb cov hlau txuas txuas rau hauv qhov chaw, tuav thiab tshem tawm cua sov.
- Ntxig 2x4P Poj Niam Header (1), 8P DIL Qhov (2, ib nrab hli mus rau nruab nrab), 1P Poj Niam Header (3) thiab 2P Poj Niam Header (4) los saum toj. Solder tawm hauv qab.
- Nyob rau sab saud, xaim xaim xaim daj rau hauv YELLOW1 thiab YELLOW2, thiab txuas dua.
- Nyob rau sab saud, xaim ib lub xaim daj rau hauv YELLOW3 thiab YELLOW4, thiab cov laug.
- Nyob rau sab saud, xaim xaim xaim daj rau hauv YELLOW5 thiab YELLOW6, thiab txuas dua.
- Nyob rau sab saud, xaim xaim liab rau hauv RED1 thiab RED2, thiab muab tshuaj txhuam.
- Hauv qab, taug qab cov xaim dub rau hauv BLACK1 thiab BLACK2, thiab cov laug.
- Hauv qab, taug ib txoj kab liab liab rau hauv RED1 thiab mus rau RED2, thiab cov laug.
- Hauv qab, taug ib txoj kab daj rau hauv YELLOW1 thiab YELLOW2, thiab cov laug.
- Hauv qab, taug ib txoj kab daj rau hauv YELLOW3 thiab YELLOW4, thiab cov laug.
Kauj Ruam 3: Xeem
Cov cai rau ntsuas yog yooj yim thiab muab los ntawm www.theengineeringprojects.com. Ib tus tswv Arduino UNO sau RF cov haujlwm rau Serial Console. ATTINY85 nRF24L01 BRICK nce ntxiv thiab sau ib tus lej rau RF channel. Raws li peb tsis siv tus lej PIN 1, Kuv yuav tawm qhov teeb tsa Rov Pib Dua Fuse Me ntsis rau tom qab Qhia, lossis koj tuaj yeem ua raws cov txheej txheem ntawm no.
Tus Sender Code
Tus Neeg Tau Txais Txoj Cai
- Rub tawm Qhov Tau Txais code mus rau Arduino UNO.
- Hlau txuas UNO rau nRF24L01 raws li qhia saum toj no.
- Rub tus xa ntawv xa mus rau ATTINY85 (ATTinyCore/ATTINY85/8MHz).
- Ntxiv ATTINY85 rau BRICK.
- Ntxiv nRF24L01 rau BRICK.
- Txuas Arduino UNO ntawm USB rau lub PC.
- Hauv Arduino IDE xaiv qhov tseeb COM Port.
- Qhib Serial Monitor ntawm 57600 baud.
- Fais fab BRICK nrog ~ 3V (saib daim duab 1 ntawm cov kauj ruam no).
- Txheeb xyuas qhov tseem ceeb sau rau console.
Code muab los ntawm https://www.theengineeringprojects.com/2015/07/interfacing-arduino-nrf24l01.html rau kev xeem ntawm
// Xa - ATTINY85 |
#defineCE_PIN3 |
#defineCSN_PIN4 |
#suav nrog "RF24.h" |
RF24 xov tooj cua (CE_PIN, CSN_PIN); |
constuint64_t kav [2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL}; |
Cov lus txib tsis tau kos npe = 1; |
voidsetup () |
xov tooj cua.begin (); |
xov tooj cua.setRetries (15, 15); |
xov tooj cua.openReadingPipe (1, kav [1]); |
xov tooj cua.startListening (); |
xov tooj cua.printDetails (); |
xov tooj cua.openWritingPipe (kav dej [0]); |
xov tooj cua.openReadingPipe (1, kav [1]); |
xov tooj cua.stopListening (); |
} |
voidloop (tsis muaj dab tsi) |
{ |
xov tooj cua.stopListening (); |
radio.write (& Hais kom ua, sizeof (unsignedlong)); |
xov tooj cua.startListening (); |
Hais kom ua ++; |
ncua (1000); |
} |
saib rawnRF24L01_aattiny85_send.ino tuav nrog ❤ los ntawm GitHub
Code muab los ntawm https://www.theengineeringprojects.com/2015/07/interfacing-arduino-nrf24l01.html rau kev xeem ntawm
// RECEIVE - ARDUINO UNO |
#suav nrog |
#suav nrog "nRF24L01.h" |
#suav nrog "RF24.h" |
RF24 xov tooj cua (9, 10); |
constuint64_t kav [2] = {0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL}; |
voidsetup (tsis muaj dab tsi) |
{ |
Serial.begin (57600); |
xov tooj cua.begin (); |
xov tooj cua.setRetries (15, 15); |
xov tooj cua.openReadingPipe (1, kav [1]); |
xov tooj cua.startListening (); |
xov tooj cua.printDetails (); |
xov tooj cua.openWritingPipe (kav dej [1]); |
xov tooj cua.openReadingPipe (1, kav [0]); |
xov tooj cua.startListening (); |
} |
voidloop (tsis muaj dab tsi) |
{ |
Serial.println ("voj"); |
yog (xov tooj cua. muaj ()) |
{ |
unsignedlong cov ntaub ntawv = 0; |
xov tooj cua.read (& cov ntaub ntawv, sizeof (unsignedlong)); |
Serial.println (cov ntaub ntawv); |
} |
ncua (1000); |
} |
saib rawnRF24L01_arduino_receive.ino tuav nrog ❤ los ntawm GitHub
Kauj Ruam 4: Cov Kauj Ruam Tom ntej
Lwm IOT123 BRICKS uas sib xyaw nrog qhov no:
- 3.3V POWER BRICK
- LIR2032 roj teeb BRICK
Pom zoo:
IOT123 - I2C KY019 BRICK: 5 Kauj Ruam
IOT123 - I2C KY019 BRICK: IOT123 BRICKS yog DIY chav nyob uas tuaj yeem sib xyaw nrog lwm IOT123 BRICKS, txhawm rau ntxiv kev ua haujlwm rau ntawm qhov chaw lossis hnav tau. Lawv tau ua raws li lub xwmfab nti, ob tog ob tog tiv thaiv nrog kev sib txuas los ntawm lub qhov. Tus lej ntawm cov BRICK no
IOT123 - I2C BRICK PROTOTYPING SLAVE: 3 Kauj Ruam
IOT123 - I2C BRICK PROTOTYPING SLAVE: Thaum tab tom tsim qhov tshiab ASSIMILATE ACTOR (KY -019 RELAY), ib pawg dev dev uas raug pov tseg ua ke los cawm kuv qee qhov haujlwm ntxiv ntawm kuv lub rooj. Nws muaj tus qauv pinouts ntawm I2C IOT123 BRICK, tab sis tso cai kev cai sib txuas rau lub sensor los ntawm ATT
IOT123 - I2C HEARTBEAT BRICK: 6 Kauj Ruam
IOT123 - I2C HEARTBEAT BRICK: IOT123 BRICKS yog chav DIY modular uas tuaj yeem sib xyaw nrog lwm IOT123 BRICKS, txhawm rau ntxiv kev ua haujlwm rau ntawm qhov chaw lossis hnav tau. Lawv tau ua raws li lub xwmfab nti, ob tog ob tog tiv thaiv nrog kev sib txuas los ntawm lub qhov. Tus lej ntawm cov BRICK no
IOT123 - I2C 2CH RELAY BRICK: 5 Kauj Ruam (nrog Duab)
IOT123 - I2C 2CH RELAY BRICK: IOT123 BRICKS yog DIY chav nyob sib dhos uas tuaj yeem sib xyaw nrog lwm IOT123 BRICKS, txhawm rau ntxiv kev ua haujlwm rau ntawm qhov chaw lossis hnav tau. Lawv tau ua raws li lub xwmfab nti, ob tog ob tog tiv thaiv nrog kev sib txuas los ntawm lub qhov. Tus lej ntawm cov BRICK no
IOT123 - I2C BRICK MASTER JIG: 4 Kauj Ruam
IOT123 - I2C BRICK MASTER JIG: Thaum txhim kho ASSIMILATE SENSORS thiab ACTORS, Kuv khaws UNO yooj yim rau xa adhoc I2C cov lus txib rau cov qauv tsim. Ib qho txiaj ntsig ntawm I2C BRICKS yog tus qauv pinouts. Ntau dua li siv cov xov hluav taws xob txhua lub sijhawm