Cov txheej txheem:
- Kauj Ruam 1: Daim Ntawv Teev Npe
- Kauj Ruam 2: Cov Kauj Ruam ntawm Lub Rooj Sib Tham
- Kauj Ruam 3: 1. Lub Hauv Paus Nruab Nrab Nrog DC Tsav
- Kauj Ruam 4: 2. Neopixel Attachment
- Kauj Ruam 5: 3. Sib dhos ntawm Rig Rig
- Kauj Ruam 6: 4. Txuas Cov Khoom Hluav Taws Xob
- Kauj Ruam 7: 5. Arduino Code
Video: Advent Lantern With POV Animation: 7 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Kev nyob ruaj khov ntawm Lub Zeem Muag (POV) cov haujlwm nyob ib puag ncig rau qee lub sijhawm, cov khoom siv DIY yooj yim thiab pheej yig txawm tias muaj rau kev yuav online. POV yog ua raws qhov pom kev tsis pom qhov twg peb pom cov khoom pom tom qab cov khoom tsis pom kev lawm txawm tias tsuas yog ib ntus xwb. Cov haujlwm POV ib txwm muaj cov duab tseem ceeb raws li lub hauv paus ntsiab lus no lossis ua haujlwm ntau teev. Txawm li cas los xij, tsis muaj ib yam dab tsi tiv thaiv rau kev ua yeeb yaj kiab siv microcontrollers ntawm lub moos txaus thiab ntse RGB LEDs. Qhov kev ua yeeb yaj kiab tshwj xeeb no yog ntawm tus tsiaj reindeer rub Christmas thaum hmo ntuj rau Advent kho kom zoo nkauj uas tuaj yeem tswj tau los ntawm ib lub WiFi siv lub xov tooj ntawm tes siv nrog web browser. Lub teeb yog siv los ntawm Wemos ESP8266 D1 Mini microcontroller ntawm Arduino tsev neeg. Cov nyiaj qiv rau cov tsiaj ntawv 8-ntsis reindeer sleight ntas mus rau tus kws tshaj lij duab kos duab Richard Fenyo.
Kauj Ruam 1: Daim Ntawv Teev Npe
Koj yuav xav tau ib rooj plaub rau txoj haujlwm no uas hnyav txaus kom ua kom lub tsev sib hloov tsis muaj qhov cuam tshuam. PSU cov ntaub ntawv qub yog qhov zoo tshaj, tsuas yog ceev faj kom tso lub capacitors tawm ua ntej kev sib dhos. Koj tseem yuav xav tau ib yam ntawm 5V-12V lub zog hloov khoom siv rau lub zog DC lub zog. Tiag tiag ib qho amperage los ntawm 500mA thiab siab dua yuav ua nws.
Qhov yuav tsum tau muaj nyob hauv qab no nrog webshop txuas thiab tus nqi tam sim no.
- 2pcs 18650 Roj Teeb, USD 4, 78
- Cov Roj Teeb Rau 2x18650, USD 0, 63
- Wemos D1 Mini, USD 2, 14
- Dub Straw, USD 0, 10
- Infrared Reflective Sensor, USD 0, 38
- 250V Fais Fab Rocker Hloov, USD 0, 10
- Toggle Swb Hloov, USD 0, 02
- 6-900rpm DC Tsav, USD 3, 99
- Adafruit Neopixel WS2812 8-ntsis, USD 1, 01
Tus nqi tag nrho yog tsawg dua USD 15, - tab sis koj tseem yuav xav tau qee cov cuab yeej siv tes, drilling, kub -kua nplaum, nrog rau cov cuab yeej siv thiab kev txawj ntse.
Kauj Ruam 2: Cov Kauj Ruam ntawm Lub Rooj Sib Tham
Chav tsev tuaj yeem sib sau ua ke raws li cov theem no.
- Lub hauv paus ruaj khov tau tsim nrog DC lub cev muaj zog thiab hloov pauv.
- Neopixels yog cov laug thiab txuas nrog rau cov quav quav.
- Rotating rig tau tsim nrog microcontroller, swb swb, infra sensor, thiab cov quav quav.
- Cov xov hlau tau txuas mus rau cov khoom siv hluav taws xob txuas
- Arduino code tau tshaj tawm rau Wemos microcontroller.
Kauj Ruam 3: 1. Lub Hauv Paus Nruab Nrab Nrog DC Tsav
- Laum ib lub qhov ntawm rooj plaub thiab txhim kho DC lub cav xws li cov ncej taw tes nce mus.
- Solder lub rocker hloov hluav taws xob thiab ib txwm 5V-12V lub zog hloov khoom siv txuas tom qab daim kab xev hauv qab no.
- Xa mus rau DC lub cev muaj zog tig rov los txog ntawm 800 RPM (tig ib feeb) ntawm 12V, ua rau thaj tsam li 10 FPS (thav duab ib pliag) hauv qhov teeb tsa zaum kawg nyob ntawm qhov tseeb cua tsis kam ntawm cov quav quav.
- Txuas lub hwj huam hloov mus rau lub qhov hluav taws xob (110 lossis 220V).
- Hloov lub rocker thiab tshawb xyuas qhov ua haujlwm ntawm DC lub cev muaj zog.
Tom ntej no, cov khoom sib hloov yuav tau sib sau ua ke thiab tsau mus rau DC lub cev muaj zog ntawm lub hauv paus.
Kauj Ruam 4: 2. Neopixel Attachment
- Txiav qhov kawg ntawm cov quav nplej hauv ob sab sib tw ntawm ib kawg ntawm kwv yees li 1.5 cm raws li daim duab qhia.
- Lace peb ntev xov nyob saum cov quav. Cov no yuav txuas Neopixel pins mus rau Wemos cov chaw nres nkoj ntawm lub rig.
- Siv peb lub xov hlau txuas rau Neopixel pins GND, 5V thiab D-IN.
- Kub nplaum cov xov hlau kom huv thiab huv si los ntawm Neopixels soldered kawg txhua txoj hauv kev txog qhov nruab nrab nruab nrab ntawm LED bar.
- Rub cov tis txiav ntawm cov quav sib nrug thiab muab cov kua nplaum kub tso rau hauv qhov sib npaug ntawm qhov nruab nrab ntawm LED bar (nyob saum cov xov hlau ntawm ib sab).
- Cov xov hlau hla los ntawm sab hauv cov quav mus rau lub rig kom mus txog qhov sib txuas Wemos cov chaw nres nkoj.
Kauj Ruam 5: 3. Sib dhos ntawm Rig Rig
Tag nrho cov rig yuav tsum tau ua kom tiav ua ntej kho rau DC lub cev muaj zog. Qhov ntawd vim tias qhov chaw kho yuav tsum tau ua kom sib luag kom qhov kev sib hloov tau zoo nyob hauv nruab nrab yam tsis muaj kev viav vias.
- Kub kua nplaum rau Wemos D1 Mini microcontroller thiab hloov swb mus rau ib sab ntawm tus tuav lub roj teeb raws li daim duab qhia.
- Kub kua nplaum rau qhov ntsuas qhov ntsuas hluav taws xob mus rau lwm sab ntawm tus tuav lub roj teeb.
- Muab cov roj teeb tso rau hauv tus tuav.
- Muab thiab muab cov quav tso rau lwm qhov kawg rau saum lub roj teeb. Ib qho ntsia hlau me me lossis lub nplhaib roj hmab yuav ua nws. Nco ntsoov tias nws yuav tsis poob thaum lub rig pib tig ntawm 10 RPM.
- Nrhiav tag nrho cov rigs nruab nrab ntawm lub ntiajteb txawj nqus rau hauv qab. Ntsuas nws ntawm qhov taub ntawm koj tus ntiv tes yuav ua nws.
- Ua lub qhov me me ntawm qhov chaw nyob rau hauv qab ntawm tus tuav lub roj teeb.
- Thov ib co kua nplaum kub thiab kho lub cav lub cev rau hauv lub qhov ntawd. Nco ntsoov tias cov kua nplaum kub tsis nkag rau hauv lub cev lub cev. Khaws nws nrog khov kho kom txog thaum cov kua nplaum qhuav.
- Txiav ib daim me me ntawm daim ntawv dawb thiab kaw nws mus rau lub hauv paus ruaj khov xws li lub teeb pom kev zoo infrared tig tig raws ze rau daim ntawv ntawd. Qhov no yuav ua rau cov duab thav duab ntawm cov duab ua kom pom tseeb ntawm qhov chaw nyob hauv txhua qhov kev hloov. Daim duab no qhia txog qhov thim rov qab ntawm kaum sab laug hauv qab ntawm lub hauv paus.
Kauj Ruam 6: 4. Txuas Cov Khoom Hluav Taws Xob
Ua raws daim duab qhia kab, muab cov khoom siv hluav taws xob tso rau hauv cov kauj ruam hauv qab no. Nco ntsoov tias tib lub chaw nres nkoj ntawm Wemos D1 Mini microcontroller yuav muab muag ntau zaus nrog ntau lub xov hlau sib txawv. Qhov ntawd yuav siv qee qhov kev coj ua, lossis txuas cov xov hlau no hauv kev npaj ua ntej yuav txuas mus rau Wemos chaw nres nkoj.
- Peb lub xov hlau (GND, 5V thiab D-IN) tau muab muag rau Wemos cov chaw nres nkoj G, 5V, thiab D3 feem.
- Ob lub xov hlau los ntawm Infrared Reflective Sensor (VCC, GND, OUT) tau muab muag rau Wemos cov chaw nres nkoj 5V, G, thiab D2 feem.
- Lub roj teeb tuav hauv av (Dub) xaim tau xaim mus rau Wemos chaw nres nkoj G.
- Lub roj teeb tuav tau zoo (Liab) xaim tau xaim mus rau tus swb hloov tus pin ze tshaj.
- Wemos 5V chaw nres nkoj tau muab muag rau lwm tus pin ntawm swb swb.
Kauj Ruam 7: 5. Arduino Code
Txoj cai tshwj xeeb no yog rau 24 qhov khoom ntawm POV Teeb, tuaj yeem tswj tau los ntawm ib lub xov tooj ntawm tes nrog lub vev xaib thiab ua rau pom kev zoo ib yam li Daim Ntawv Qhia Ntiaj Teb, Matrix Animation Effect, thiab Reindeer Sleight animation. Xav tias dawb los kho tus lej ntawm tus lej, cov txiaj ntsig cuam tshuam, lossis WiFi qhov chaw sib txuas rau koj qhov xav tau hauv qhov chaws.
// 24 bits POV Lantern - 2019 Peter Csurgay
#suav nrog ESP8266WiFiMulti.h
#suav nrog WiFiClient.h #suav nrog ESP8266WebServer.h #suav nrog WebSocketsServer.h #suav nrog Adafruit_NeoPixel.h
#define DEBUG 1
Txoj hlua kab ntawv [3] = {"INSTRUCTABLES", "ARDUINO", "CONTEST"};
const uint8_t palette [8] [3] = {
{0, 0, 0}, // 0 - Pob tshab {0, 0, 127}, // 1 - Xiav {127, 0, 0}, // 2 - Liab {127, 127, 0}, // 3 - Daj {0, 127, 0}, // 4 - Ntsuab {127, 24, 0}, // 5 - Txiv kab ntxwv {127, 0, 127}, // 6 - Magenta {127, 127, 127} // 7 - Dawb};
const unsigned char world [24] [42] PROGMEM =
{ { 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,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 0 }, { 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0 }, { 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 }, { 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0 } } };
#define INFRATRIGGER_PIN D2
#define NEOPIXELS_PIN D3 #define NEO_NUMPIXELS 24
Adafruit_NeoPixel pixels = Adafruit_NeoPixel (NEO_NUMPIXELS, NEOPIXELS_PIN, NEO_GRB + NEO_KHZ800);
IPAddress lub zos IPaddress;
Tus IP Chaw Nyob Chaw Nyob IP Chaw Nyob; WiFiServer server (80); WebSocketsServer webSocket = WebSocketsServer (81); uint8_t canvas [24] [65]; uint8_t co = 0; uint8_t scene = 0; uint8_t numScenes = 5; String scenes [6] = {"NTIAJ TEB", "SANTA", "PEPPER", "TEXT", "MATRIX"}; uint8_t tig = 1; uint8_t numGreens = 0; // MATRIX tus lej ntawm cov kab poob uint8_t zaub ntsuab [64] [2]; // MATRIX random pos x thiab y ntawm kab poob
void teeb tsa () {
yog (DEBUG) {Serial.begin (9600); Serial.println ("Pib …"); } ncua (3000);
ESP8266WiFiMulti wifiMulti;
wifiMulti.addAP ("wifissid", "pwd"); wifiMulti.addAP ("mobilessid", "pwd"); wifiMulti.addAP ("laptopssid", "pwd"); yog (DEBUG) Serial.print ("Txuas Chaw Nres Tsheb mus rau"); thaum (wifiMulti.run ()! = WL_CONNECTED) {ncua (1000); yog (DEBUG) Serial.print ("."); } yog (DEBUG) Serial.println (""); yog (DEBUG) Serial.print ("WiFi txuas nrog: SSID ="); yog (DEBUG) Serial.println (WiFi. SSID ()); localIPaddress = WiFi.localIP (); yog (DEBUG) Serial.print ("Chaw Nyob Chaw Nyob IP chaw nyob:"); yog (DEBUG) Serial.println (localIPaddress);
server.begin ();
yog (DEBUG) Serial.println ("Server (80) pib"); webSocket.begin (); webSocket.onEvent (webSocketEvent); yog (DEBUG) Serial.println ("WebSocket (81) pib"); uint8_t coli = 0; rau (int i = 0; i <24; i ++) {rau (int j = 0; j <64; j ++) {canvas [j] = coli ++; coli = coli % 7; } canvas [kuv] [64] = 0; } pinMode (INFRATRIGGER_PIN, INPUT); attachInterrupt (digitalPinToInterrupt (INFRATRIGGER_PIN), pleev xim, RISING); pixels.begin (); pixels.show (); yog (DEBUG) {Serial.print ("Neopixel pib, NUMPIXELS:"); Serial.println (pixels.numPixels ()); }}
void webSocketEvent (uint8_t num, WStype_t yam, uint8_t * payload, size_t ntev) {
yog (hom == WStype_TEXT) {String req = String ((const char *) payload); yog (DEBUG) {Serial.print ("81 Thov:"); Serial.println (xav tau); } txheej txheemReq (req); }}
Txoj hlua rip2 (Txoj hlua) {
Txoj hlua res; int ib = 0; thaum (s [kuv]! = '/') kuv ++; kuv ++; thaum (s [kuv]! = '/') kuv ++; kuv ++; thaum (s ! = '/' && s ! = '&& s ! =' / r '&& s ! =' / n ') res+= s [i ++]; rov res; }
void processReq (Txoj hlua req) {
yog (req.indexOf ("/tig")! = -1) {tig = 1; } lwm tus yog (req.indexOf ("/scene")! = -1) {tig = 0; Txoj hlua sc = rip2 (req); yog (isDigit (sc [0])) scene = sc.toInt (); lwm {scene = 0; rau (int i = 0; i
void voj () {
webSocket.loop (); WiFiClient tus thov = server.available (); yog (! neeg) {rov qab; } Txoj hlua req = client.readStringUntil ('\ r'); yog (DEBUG) {Serial.print ("80 Thov:"); Serial.println (xav tau); } txheej txheemReq (req);
client.flush (); cov.
Txoj hlua s = "HTTP/1.1 200 OK / r / nContent-Type: text/html; charset = UTF-8 / r / n Access-Control-Allow-Headers: Content-Type / r / nAccess-Control-Allow-Origin: *\ r / n Kev sib txuas: kaw / r / n / r / n "; s + = "localIP:" + ipToString (localIPaddress) + ""; s + = "apIP:" + ipToString (apIPaddress) + ""; client.print (tus); ncua (100); client.stop (); cov. }
void xim () {
rau (int i = 0; i <65; i ++) {rau (int j = 0; j <24; j ++) {unsigned char ind = canvas [j] ; pixels.setPixelColor (j, pixels. Color (palette [ind] [0], palette [ind] [1], palette [ind] [2])); } pixels.show (); qeebMicroseconds (10); } cov = (co + 1) % 40; yog (tig) {yog (co == 0) {scene = (scene+1) % numScenes; yog (DEBUG) {Serial.print ("Scene:"); Serial.println (qhov chaw); }} yog (co == 0) loadCanvas (scenes [scene]); } yog (scenes [scene].indexOf ("SANTA")! = -1) {rau (int i = 0; i <8; i ++) rau (int j = 0; j = co && j
void loadCanvas (Txoj hlua dab tsi) {
clearCanvas (); yog (DEBUG) {Serial.print ("loadCanvas:"); Serial.println (dab tsi); } yog (what.indexOf ("TEXT")! = -1) {rau (int l = 0; l <3; l ++) rau (int n = 0; n = 12 && j <51) canvas [j] = pgm_read_byte_near (kua txob +j-12); } lwm yog (what.indexOf ("NTIAJ TEB")! = -1) {rau (int i = 0; kuv <24; i ++) rau (int j = 0; j = 11 && j <53) canvas [j] = pgm_read_byte_near (ntiaj teb +j-11); }}
void clearCanvas () {
yog (DEBUG) Serial.println ("clearCanvas"); rau (int i = 0; i <24; i ++) rau (int j = 0; j <65; j ++) canvas [j] = 0; }
Txoj hlua ipToString (IPAddress ip) {
Txoj hlua s = ""; rau (int i = 0; i <4; i ++) s+= i? "." + Txoj hlua (ip ): Txoj hlua (ip )); rov s; }
Pom zoo:
DIY LED Advent Calendar: 3 Kauj Ruam
DIY LED Advent Calendar: Kuv yuav piav qhia peb li cas peb ua lub moos zoo sib xws uas ua haujlwm ob zaug raws li daim ntawv qhia hnub nyoog. Muaj 24 ws2811 leds nyob ib ncig ntawm lub moos nyob rau hauv ib lub voj voog thiab txhua ntawm lawv lub teeb ntsuab rau hnub ua ntej Christmas. Hnub Christmas, txhua lub teeb yog li
Ua Tus Pov Hwm Pov Tseg Pi Nrog ML !: 8 Kauj Ruam (nrog Duab)
Ua Tus Pej Xeem Pov Tseg Pi Nrog ML !: Qhov Project Trash Classifier, paub zoo tias "Nws mus qhov twg?! kawm hauv Lobe, tus pib ua phooj ywg (tsis muaj tus lej!)
Jack-O'-lantern´'s Lantern: 3 Kauj Ruam
Jack-O'-lantern's Lantern: Nov yog txoj haujlwm koj tuaj yeem ua tau yooj yim hauv tsev nrog menyuam yaus thiab tsev neeg thaum lub sijhawm txaus ntshai no! Nws suav nrog ntxiv lub teeb rau koj lub taub dag (nws tuaj yeem yog qhov tiag lossis yog ib qho khoom cuav) yog li koj tuaj yeem sau muaj Jack-o´-lanterns's Lantern
Pov Tseg Tsis Yog Pov Tseg: 5 Kauj Ruam
Pov Tseg Tsis Txhob Pov Tseg.: Peb pab neeg tau pib qhov haujlwm hu ua " Lub thoob khib nyiab yeej tsis raug pov tseg. &Quot; nrog cov teeb meem pov tseg ntawm KARTS. Muaj ntau yam ua rau tsev kawm ntawv tsim cov thoob khib nyiab ntau thiab ua rau cov neeg tsis txaus siab pov tseg. Txhawm rau daws qhov teeb meem no, thaum xub thawj peb
Tsis siv neeg Catapult rau Pov Cov Khoom Noj (dev, miv, Qaib, thiab lwm yam), Pov Pob thiab Ntau Ntxiv!: 4 Cov Kauj Ruam (nrog Duab)
Tsis siv neeg Catapult rau Zaub Zaub Tsiaj (dev, Miv, Qaib, Etc), Pov Pob thiab Ntau Ntxiv!: Nyob zoo thiab txais tos rau kuv thawj Qhov Kev Qhia! Kuv tau tsim txoj hauv kev kom qeeb qhov no, los ntawm cov npas nrog cov zaub mov sab hauv los pov nws thoob plaws lub tiaj nraum qaum tsev. Amazingly, nws yog