Cov txheej txheem:
- Kauj Ruam 1: Nqi Cov Khoom Siv
- Kauj Ruam 2: CIRCUIT
- Kauj Ruam 3: MAGNETIC BASE - FLEXIBLE ARM
- Kauj Ruam 4: SOLAR - Roj teeb CHARGER
- Kauj Ruam 5: Txuas txhua yam ua ke
- Kauj Ruam 6: KEV PAB CUAM TSEV KAWM NTAWV
- Kauj Ruam 7: WIRELESS CONTROL PROGRAM THIAB ANDROID APPLICATION
- Kauj Ruam 8: NTUJ DUAB
Video: SOLAR WIRELESS LAMP NROG MAGNETIC FLEXIBLE ARM: 8 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Txoj haujlwm no tau tsim los ntawm lub teeb tawg & nodeMCU. Lub teeb zoo nkauj no tuaj yeem hloov kho hauv ib qho kev qhia & txuas ntawm cov khoom sib nqus lossis muab tso rau ntawm lub rooj. Nws tuaj yeem tswj tau hauv ob hom raws li hauv qab no:
- Wireless tswj hom, raws li YouTube txuas hauv qab no:
- Hom kev sib tham sib, raws li YouTube txuas hauv qab no:
Kauj Ruam 1: Nqi Cov Khoom Siv
B. O. M lis:
Txog kev sib tham sib tham, Kuv siv MPU6050 kom tau txais cov ntaub ntawv gyro los ntawm NodeMCU los tswj lub teeb xim.
Cov ntaub ntawv duab rau txoj haujlwm no:
Kauj Ruam 2: CIRCUIT
Qhov no yog qhov yooj yim Circuit Court, raws li Fritzing schematic saum toj no, nrog 1 RGB Led hom anode yam, peb txwv tam sim no resistors R100 & MPU6050.
Lub teeb pom kev zoo yog siv los ntawm ib lub teeb tawg & txuas nrog nodeMCU puag los ntawm 2 tus ntsia hlau los yog lo lawv nrog cov kua nplaum muaj zog.
Kev teeb tsa ua haujlwm:
Schematic hauv qab no:
Kauj Ruam 3: MAGNETIC BASE - FLEXIBLE ARM
Cov caj npab yoog tau tuaj yeem rov siv tau los ntawm cov kais dej hloov pauv tau. Tej yam zoo li no:
Nrog qee cov lus qhia, peb sim txuas lawv mus rau lub hauv paus hlau nplaum ruaj khov hauv qab ntawm caj npab hloov pauv. Nyob rau sab saum toj, peb tau ua qhov tho qhov txuas rau peb lub rooj sib tham hauv Circuit Court thiab lub hnub ci/lub roj teeb them. Ua lub hauv paus no, peb tuaj yeem tso teeb rau saum npoo zoo li lub rooj, pem teb …; lossis nws tuaj yeem txuas nrog cov khoom sib nqus zoo li steel ncej, qauv hlau.
Kauj Ruam 4: SOLAR - Roj teeb CHARGER
Nws tuaj ntawm lub teeb uas them nyiaj puas. Kuv ntxiv qhov qhib/tua hluav taws xob thiab cov xov hluav taws xob muab rau nodeMCU. Nws kuj tseem muaj ib qho chaw nres nkoj USB thiab ib lub ntsaws rau lub roj teeb them.
Kauj Ruam 5: Txuas txhua yam ua ke
Txuas txhua ntu: NodeMCU & lub teeb pom kev zoo, hnub ci & roj teeb hlwb, hloov caj npab ua ke.
KAWG
CHARGING MODE
Kauj Ruam 6: KEV PAB CUAM TSEV KAWM NTAWV
Cov xim yuav raug hloov pauv thaum peb hloov kho caj npab lossis hloov lub teeb.
LAMP INTERACTIVE
#suav nrog |
// MPU6050 Qhua Chaw Nyob |
const uint8_t MPU6050SlaveAddress = 0x68; |
// Xaiv SDA thiab SCL pins rau I2C kev sib txuas lus - Pin default in WIRE LIBRARY: SCL - D1 & SDA - D2 ntawm NODEMCU |
// const uint8_t SCL = D1; |
// const uint8_t SDA = D2; |
cov int R = 14; |
const int G = 12; |
cov int B = 13; |
// MPU6050 ob peb teeb tsa npe chaw nyob |
const uint8_t MPU6050_REGISTER_SMPLRT_DIV = 0x19; |
const uint8_t MPU6050_REGISTER_USER_CTRL = 0x6A; |
const uint8_t MPU6050_REGISTER_PWR_MGMT_1 = 0x6B; |
const uint8_t MPU6050_REGISTER_PWR_MGMT_2 = 0x6C; |
const uint8_t MPU6050_REGISTER_CONFIG = 0x1A; |
const uint8_t MPU6050_REGISTER_GYRO_CONFIG = 0x1B; |
const uint8_t MPU6050_REGISTER_ACCEL_CONFIG = 0x1C; |
const uint8_t MPU6050_REGISTER_FIFO_EN = 0x23; |
const uint8_t MPU6050_REGISTER_INT_ENABLE = 0x38; |
const uint8_t MPU6050_REGISTER_ACCEL_XOUT_H = 0x3B; |
const uint8_t MPU6050_REGISTER_SIGNAL_PATH_RESET = 0x68; |
int16_t AccelX, AccelY, AccelZ, Kub, GyroX, GyroY, GyroZ; |
void teeb tsa () { |
pinMode (R, OUTPUT); |
pinMode (G, OUTPUT); |
pinMode (B, NTAWV); |
//Serial.begin(9600); |
Wire.begin (SDA, SCL); |
MPU6050_Init (); |
} |
void voj () { |
uint16_t Ax, Ay, Az, T, Gx, Gy, Gz; |
uint16_t Liab, Ntsuab, Xiav; |
Nyeem_RawValue (MPU6050SlaveAddress, MPU6050_REGISTER_ACCEL_XOUT_H); |
// Siv tus nqi meej |
Ax = myAbs (AccelX); |
Ay = myAbs (AccelY); |
Az = myAbs (AccelZ); |
// Nplai hauv ntau |
Liab = daim ntawv qhia (Ax, 0, 16384, 0, 1023); |
Ntsuab = daim ntawv qhia (Ay, 0, 16384, 0, 1023); |
Xiav = daim ntawv qhia (Az, 0, 16384, 0, 1023); |
// Serial print los xyuas |
//Serial.print("Red: "); Serial.print (Liab); |
//Serial.print("Green: "); Serial.print (Ntsuab); |
//Serial.print("Blue: "); Serial.print (Xiav); |
// Sau analog rau LED |
analogWrite (R, Liab); // R ib |
analogWrite (G, Ntsuab); // G |
analogWrite (B, Xiav); // IB |
ncua (200); |
} |
void I2C_Write (uint8_t deviceAddress, uint8_t regAddress, uint8_t cov ntaub ntawv) { |
Wire.beginTransmission (chaw nyob); |
Wire.write (regAddress); |
Wire.write (cov ntaub ntawv); |
Wire.endTransmission (); |
} |
// Nyeem tag nrho 14 qhov sau npe |
void Read_RawValue (uint8_t deviceAddress, uint8_t regAddress) { |
Wire.beginTransmission (chaw nyob); |
Wire.write (regAddress); |
Wire.endTransmission (); |
Wire.requestFrom (deviceAddress, (uint8_t) 14); |
AccelX = (((int16_t) Wire.read () << 8) | Wire.read ()); |
AccelY = (((int16_t) Wire.read () << 8) | Wire.read ()); |
AccelZ = (((int16_t) Wire.read () << 8) | Wire.read ()); |
Kub = (((int16_t) Wire.read () << 8) | Wire.read ()); |
GyroX = (((int16_t) Wire.read () << 8) | Wire.read ()); |
GyroY = (((int16_t) Wire.read () << 8) | Wire.read ()); |
GyroZ = (((int16_t) Wire.read () << 8) | Wire.read ()); |
} |
// Kho MPU6050 |
void MPU6050_Init () { |
ncua (150); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_SMPLRT_DIV, 0x07); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_PWR_MGMT_1, 0x01); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_PWR_MGMT_2, 0x00); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_CONFIG, 0x00); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_GYRO_CONFIG, 0x00); // teeb tsa +/- 250 degree/thib ob puv nplai |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_ACCEL_CONFIG, 0x00); // teeb tsa +/- 2g puv teev |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_FIFO_EN, 0x00); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_INT_ENABLE, 0x01); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_SIGNAL_PATH_RESET, 0x00); |
I2C_Write (MPU6050SlaveAddress, MPU6050_REGISTER_USER_CTRL, 0x00); |
} |
// Tsis Muaj Nqis |
ntab myAbs (ntab hauv) { |
return (hauv)> 0? (hauv):-(hauv); |
} |
saib rawINTERACTIVE LAMP PROGRAM tuav nrog ❤ los ntawm GitHub
Kauj Ruam 7: WIRELESS CONTROL PROGRAM THIAB ANDROID APPLICATION
Lwm txoj hauv kev, peb tuaj yeem siv Android App los tswj RGB LED nrog Android hauv WiFi Network. Txuas Android App: NODEMCU tswj RGB LED APP
Rau Arduino program, koj tuaj yeem xa mus rau:
microcontrollerkits.blogspot.com/2016/05/es…
Tom qab rub cov program mus rau NodeMCU, thawj zaug yuav muab rau peb NodeMCU tus IP chaw nyob ntawm cov ntawv luam tawm. Hauv kuv qhov xwm txheej, nws yog: 192.164.1.39 ntawm chaw nres nkoj 80.
Tam sim no, peb tuaj yeem tswj lub teeb wireless nrog lub khoos phis tawj/ ntsiav tshuaj/ xov tooj ntawm tes los ntawm kev nkag mus rau qhov chaw nyob saum toj no rau hauv internet tshawb.
Los yog siv Android app:
Kauj Ruam 8: NTUJ DUAB
Pom zoo:
FLEXBALL - Pua pua Pixel Flexible PCB Pob Nrog WiFi: 6 Cov Kauj Ruam (nrog Duab)
FLEXBALL - Pua pua Pixel Flexible PCB Pob Nrog WiFi: Nyob zoo cov neeg tsim khoom, nws yog tus tsim moekoe! Nws tau tswj hwm los ntawm ESP8285-01f - qhov tsawg tshaj plaws ESP raws tus qauv los ntawm Espressif. Tsis tas li ntawd nws muaj ADXL345 kev ntsuas nrawm
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Magnetic Camera Arm: 5 Cov Kauj Ruam (nrog Duab)
Magnetic Camera Arm: Kuv tau ua lub koob yees duab sib nqus no txhawm rau pab kuv ua kuv cov vis dis aus Youtube. Nov yog txoj haujlwm yooj yim kom ua tiav. Txhua ntu yog ib qho yooj yim mus nrhiav los ntawm Amazon thiab koj lub khw muag khoom kho vajtse hauv ib cheeb tsam
DIY Flexible Printed Circuits: 5 Kauj Ruam (nrog Duab)
DIY Flexible Printed Circuits: Ua koj tus kheej ib leeg-sab sauv hloov pauv tau yooj yim siv lub tshuab luam ntawv tawv, tooj liab-coated polyimide zaj duab xis, thiab cov khoom siv hluav taws xob sib xyaw ua ke. Koj yuav pom flex PCBs hauv ntau lub xov tooj ntawm tes lossis cov khoom siv me me zoo sib xws. Flex PCBs