Cov txheej txheem:
- Kauj Ruam 1: Daim Duab Sketch
- Kauj Ruam 2: Sau Cov Khoom Kho Vajtse
- Kauj Ruam 3: Tsim Circuit Court
- Kauj Ruam 4: Kev Kho Vajtse Txuas
- Kauj Ruam 5: Tsim Software
- Kauj Ruam 6: Debug ntawm Breadboard
- Kauj ruam 7: Khoos phis tawj sib dhos
- Kauj Ruam 8: Tsim Vaj Tsev Khoom Siv Hluav Taws Xob hauv Adobe Illustrator
- Kauj Ruam 9: Daim Duab Qhia Txog Tus Qauv
- Kauj Ruam 10: Birch Plywood Prototype
Video: FinduCar: Lub Ntsej Muag Tsheb Ntsuas Qhia Cov Neeg rau Qhov Chaw Lub Tsheb Nres Tsheb: 11 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Txhawm rau daws cov teeb meem saum toj no, txoj haujlwm no thov tsim kho lub tsheb ntse uas tuaj yeem coj tib neeg mus rau qhov chaw lawv nres tsheb. Thiab kuv txoj kev npaj koom nrog GPS rau hauv lub tsheb tseem ceeb. Tsis tas yuav siv lub smartphone app txhawm rau taug qab lub tsheb, txhua qhov kev qhia yuav tsuas yog qhia ntawm tus yuam sij hauv lub tsheb.
Kauj Ruam 1: Daim Duab Sketch
Thaum tib neeg nias lub pob kom xauv lub tsheb, cov ntaub ntawv qhia chaw yuav raug kaw hauv lub microcontroller txiav. Tom qab ntawd, thaum tib neeg pib taug kev mus rau lub tsheb, qhov sib txawv LED tau teeb tsa kom ncaj qha mus rau txoj haujlwm ntawm lub tsheb thiab ntsais ntsais zaus qhia qhov deb ntawm lub tsheb. Lawv tuaj yeem yooj yim ua raws qhov ntsais ntsais LED thiab pom lub tsheb sai.
Kauj Ruam 2: Sau Cov Khoom Kho Vajtse
Cov no yog cov khoom siv hauv txoj haujlwm no. Qee qhov yog los ntawm cov khoom siv me me (cov ntawv ntim khoom, khawm, lub taub hau), lwm tus tau yuav los ntawm Adafruit lub vev xaib raug cai (Adafruit Feather M0, Adafruit Ultimate GPS module, Lpoly Battery and Coin Cell Battery) thiab Amazon (NeoPixel Ring - 12 RGB LED).
Kauj Ruam 3: Tsim Circuit Court
Neopixel_LED txuas nrog tus PIN 6 ntawm Feather M0
Button_Unlock txuas nrog tus PIN 12 ntawm Feather M0
Button_Lock txuas nrog tus PIN 13 ntawm Feather M0
Kauj Ruam 4: Kev Kho Vajtse Txuas
Muab cov taub hau tso nrog Adafruit M0 Feather, Adafruit Ultimate GPS Featherwing. Muab ob lub laug cam tso ua ke. GPS FeatherWing ntsaws ncaj rau hauv koj lub rooj plaub M0 yam tsis muaj xov hlau ntxiv.
Kauj Ruam 5: Tsim Software
Xeem Cheeb Tsam
Nyeem FIX
void teeb tsa () {
Serial.println ("GPS echo test"); Serial.begin (9600); Serial1.begin (9600); // default NMEA GPS baud}
void voj () {
yog (Serial.available ()) {char c = Serial.read (); Serial1.write (c); } yog (Serial1.available ()) {char c = Serial1.read (); Serial.write (c); }}
Blink LED Nplhaib
Saib Adafruit NeoPixel Piv txwv.
GPS suav ua haujlwm
Xam lub Azimuth
// Suav Azimuth
ob azimuth (ob lat_a, ob lon_a, ob lat_b, ob lon_b) {
ob d = 0; lat_a = lat_a*PI/180; lon_a = lon_a*PI/180; lat_b = lat_b*PI/180; lon_b = lon_b*PI/180; d = sin (lat_a)*sin (lat_b)+cos (lat_a)*cos (lat_b)*cos (lon_b-lon_a); d = sqrt (1-d*d); d = cos (lat_b)*sin (lon_b-lon_a)/d; d = asin (d)*180/PI; rov d; }
Xam lub sijhawm ntawm lub moos LED, uas tseem yog kev qhia ntawm lub tsheb
// Xam lub sijhawm ntawm LED moos
int led_time (kaum ob lub kaum) {
tus chij = 0; yog (kaum sab xis = 15) {kaum_ sij hawm = kaum_ sij hawm + 1; } yog (chij == 1) {angle_time = 12 - angle_time; } rov qab angle_time; }
Xam qhov nrug ntawm tus neeg thiab nws lub tsheb
// Xam qhov deb
ob nrug (ob lat_a, ob lon_a, ob lat_b, ob lon_b) {
ob npaug EARTH_RADIUS = 6378137.0; ob npaug radLat1 = (lat_a * PI / 180.0); ob radLat2 = (lat_b * PI / 180.0); ob npaug a = radLat1 - radLat2; ob b = (lon_a - lon_b) * PI / 180.0; ob s = 2 * asin (sqrt (pow (sin (a / 2), 2) + cos (radLat1) * cos (radLat2) * pow (sin (b / 2), 2)))); s = s * EARTH_RADIUS / 10000000; rov s; }
LED Zaub Ua Haujlwm
Teeb LEDs hauv lub voj voog qhia tias nws pib taug kev
// LED ntiv nplhaib teeb pom kev ib ntawm ib qho qhia tias kev pib pib
void colorWipe (uint32_t c, uint8_t tos) {
rau (uint16_t kuv = 0; kuv strip.setPixelColor (i, c); strip.show (); ncua (tos);}}
Tau txais LED zaus raws qhov deb
// Tau Txais Zaus LED
int zaus (ob npaug nrug) {
int f = (int) nrug * 20; rov f; }
Tsau qhov tseeb ntawm LED qhia txog kev taw qhia ntawm lub tsheb
// Zaub ntawm LED
strip.clear ();
strip.show (); ncua (zaus (tsheb_ neeg_distance)); // ncua (500); strip.setPixelColor (angle_time, strip. Color (0, 0, 255)); strip.show (); ncua (zaus (tsheb_ neeg_distance)); // ncua (500);
// Disable LED
yog (button_flag == 1 && car_person_distance <5.0) {button_flag = 0; led_flag = 1; strip.clear (); strip.show (); }
Lub ntsiab
#suav nrog Adafruit_GPS.h #suav nrog Adafruit_NeoPixel.h #suav nrog HardwareSerial.h #include Button.h #suav nrog lej.h
#define Neopixel_LED_PIN 6
#define Neopixel_LED_NUM 12 #define Button_Lock_PIN 13 #define Button_Unlock_PIN 12 #define GPSSerial Serial1
#define GPSECHO tsis tseeb
Adafruit_GPS GPS (& GPSSerial); Adafruit_NeoPixel strip = Adafruit_NeoPixel (Neopixel_LED_NUM, Neopixel_LED_PIN, NEO_GRB + NEO_KHZ800); Khawm khawm_lock (Khawm_Lock_PIN); Khawm button_unlock (Khawm_Unlock_PIN); int khawm_flag = 0; int led_flag = 1; uint32_t timer = millis (); ob chav car_lat, car_lon; ob chav car_person_distance; ob npaug txav_direction; ob chav car_azimuth; ob chav car_person_angle; int lub sij hawm_ sijhawm;
void teeb tsa () {
Serial.begin (115200); // Serial1.begin (9600); GPS.begin (9600); // default NMEA GPS baud strip.begin (); // tsis pom zoo cov kab no kom qhib rau RMC (pom zoo yam tsawg kawg nkaus) thiab GGA (kho cov ntaub ntawv) suav nrog qhov siab GPS.sendCommand (PMTK_SET_NMEA_OUTPUT_RMCGGA); // Teeb tsa tus nqi hloov tshiab GPS.sendCommand (PMTK_SET_NMEA_UPDATE_1HZ); // 1 Hz hloov tus nqi // Thov hloov tshiab ntawm tus kav hlau txais xov xwm, tawm tswv yim kom nyob ntsiag to // GPS.sendCommand (PGCMD_ANTENNA); ncua (1000);}
void loop () {// yog (Serial.available ()) {
// char c = Serial.read (); // Serial1.write (c); //} // yog (Serial1.available ()) {char c = GPS.read (); yog (GPSECHO) yog (c) Serial.print (c); // yog tias tau txais kab lus, peb tuaj yeem tshawb xyuas cov ntawv txheeb xyuas, txheeb xyuas nws… ntes lwm cov kab lus! // yog li yuav ceev faj heev yog tias siv OUTPUT_ALLDATA thiab sim ua kom luam tawm cov ntaub ntawv Serial.println (GPS.lastNMEA ()); // qhov no kuj teeb tsa tus tshiabNMEAreceived () chij rau cuav yog (! // peb tuaj yeem tsis tuaj yeem txheeb xyuas kab lus hauv qhov xwm txheej twg peb yuav tsum tos lwm qhov} // yog millis () lossis timer qhwv ncig, peb yuav cia li rov pib dua yog tias (timer> millis ()) timer = millis (); yog (millis () - timer> 2000) {timer = millis (); // rov teem caij timer.print ("\ nTime:"); Serial.print (GPS.hour, DEC); Serial.print (':'); Serial.print (GPS.minute, DEC); Serial.print (':'); Serial.print (GPS.seconds, DEC); Serial.print ('.'); Serial.println (GPS.milliseconds); Serial.print ("Hnub tim:"); Serial.print (GPS hnub, DEC); Serial.print ('/'); Serial.print (GPS.month, DEC); Serial.print ("/20"); Serial.println (GPS.year, DEC); Serial.print ("Kho:"); Serial.print ((int) GPS.fix); Serial.print ("zoo:"); Serial.println ((int) GPS.fixquality); yog (GPS.fix) {Serial.print ("Qhov chaw:"); Serial.print (GPS.latitude, 4); Serial.print (GPS.lat); Serial.print (","); Serial.print (GPS.longitude, 4); Serial.println (GPS.lon); Serial.print ("Qhov chaw (hauv qib, ua haujlwm nrog Google Maps):"); Serial.print (GPS.latitudeDegrees, 4); Serial.print (","); Serial.println (GPS.longitudeDegrees, 4); Serial.print ("Ceev (pob):"); Serial.println (GPS.speed); Serial.print ("Lub:"); Serial.println (GPS.angle); Serial.print ("Qhov siab:"); Serial.println (GPS.altitude); Serial.print ("Satellites:"); Serial.println ((int) GPS.satellites); // Txuag GPS ntawm lub tsheb yog (button_lock.read ()) {car_lat = GPS.latitudeDegrees; car_lon = GPS.longitudeDegrees; // rau debug Serial.print ("carLatitude:"); Serial.println (car_lat); Serial.print ("carLongitude:"); Serial.println (car_lon); } // Pib nrhiav lub tsheb yog (button_flag == 0) {button_flag = button_unlock.read (); } yog (button_flag == 1 && led_flag == 1) {colorWipe (strip. Color (0, 255, 0), 500); led_flag = 0; } yog (button_flag == 1) {car_person_distance = nrug (GPS.latitudeDegrees, GPS.longitudeDegrees, car_lat, car_lon); // Xam qhov deb // car_person_distance = nrug (100.0005, 100.0005, 100.0, 100.0); // rau debug Serial.println (car_person_distance); txav_direction = GPS.angle; // Sau cov lus qhia txav (kaum sab xis) // txav_direction = 100.0; // Sau Azimuth (kaum) car_azimuth = azimuth (GPS.latitudeDegrees, GPS.longitudeDegrees, car_lat, car_lon); // car_azimuth = azimuth (100.0005, 100.0005, 100.0, 100.0); // Xam lub sijhawm ntawm LED moos car_person_angle = car_azimuth - txav_direction; angle_time = coj_time (car_person_angle); // Zaub ntawm LED strip.clear (); strip.show (); // ncua (zaus (tsheb_ neeg_distance)); ncua (500); strip.setPixelColor (angle_time, strip. Color (0, 0, 255)); strip.show (); // ncua (zaus (tus neeg_ neeg_distance)); ncua (500); // Lov tes taw LED yog (button_flag == 1 && car_person_distance <5.0) {button_flag = 0; led_flag = 1; strip.clear (); strip.show (); }}} // //}}}
Kauj Ruam 6: Debug ntawm Breadboard
Kauj ruam 7: Khoos phis tawj sib dhos
Kauj Ruam 8: Tsim Vaj Tsev Khoom Siv Hluav Taws Xob hauv Adobe Illustrator
Kauj Ruam 9: Daim Duab Qhia Txog Tus Qauv
Cov kauj ruam no yog siv los txheeb xyuas qhov loj ntawm lub tsev thiab txhua daim ntawm tus qauv, ua kom ntseeg tau tias lub thawv loj, thiab khawm txoj haujlwm, thiab txoj haujlwm LED haum rau cov khoom siv hluav taws xob sib dhos.
Kauj Ruam 10: Birch Plywood Prototype
Nov yog thawj tsab ntawv. Ib lub xwmfab qhov rau ntsaws rau hauv lub charger tau ntxiv rau ib qho ntawm daim ntawv thaum kawg.
Pom zoo:
Tham Nrog Cov Ntsej Muag iav rau Cov Neeg Dig Muag: 7 Cov Kauj Ruam
Tham Nrog Cov Ntsej Muag Ntsej Muag rau Cov Neeg dig muag: Muaj ntau yam khoom siv ntse xws li tsom iav ntse, ntse saib, thiab lwm yam muaj nyob hauv khw. Tab sis txhua tus ntawm lawv tau tsim rau peb. Muaj qhov tsis txaus ntawm thev naus laus zis los pab rau lub cev muaj teeb meem.Kuv xav tsim qee yam uas yog
Lub Ntsej Muag Ntsej Muag Ntsej Muag => Covid Tiv Thaiv!: 5 Kauj Ruam
Lub Ntsej Muag Ntsej Muag Ntsej Muag => Covid Tiv Thaiv!: Tus naj npawb 1 yam uas cov neeg saib xyuas kev noj qab haus huv xav kom tib neeg ua thaum lub sijhawm muaj tus kabmob kis no yog hnav lub ntsej muag thaum tawm mus rau qhov chaw pej xeem, tab sis qee tus neeg tseem ua qhov muag tsis pom qhov lus ceeb toom. Nkag mus ….. COVID PrevEnter! Tus neeg hlau no siv lub koob yees duab Pixy2
Vortex Saib: lub ntsej muag Infinity Daim iav Lub Ntsej Muag: 10 Cov Kauj Ruam (nrog Duab)
Vortex Watch: Infinity Mirror Wristwatch: Lub hom phiaj ntawm txoj haujlwm no yog txhawm rau tsim qhov hnav tau ntawm lub iav tsom iav infinity. Nws siv nws cov RGB LEDs los qhia lub sijhawm los ntawm kev teev teev, feeb, thiab vib nas this rau Liab, Ntsuab, thiab Xiav teeb raws thiab sib tshooj cov xim no
Ntsej Muag Hloov Qhov Muag Qhov Muag - Ua Dab Tsi: 14 Kauj Ruam (nrog Duab)
Lub ntsej muag hloov qhov ntsej muag - Ua Dab Tsi: Koj ua dab tsi thaum koj tsis tuaj yeem txiav txim siab yam koj xav ua rau Xus? Ua txhua yam. Lub npog ntsej muag yog suav nrog daim npog 3D luam tawm dawb, lub paj yeeb raspberry, lub projector me me thiab lub roj teeb. Nws muaj peev xwm kwv yees txhua yam thiab txhua yam
OpenEyeTap: 3D Luam Ntawv & Lub Ntsej Muag Ntsej Muag iav: 12 Cov Kauj Ruam (nrog Duab)
OpenEyeTap: 3D Luam Ntawv & Lub Ntsej Muag Ntsej Muag iav: Zoo siab txais tos rau Qhib EyeTap's Cov Ntawv Qhia! Peb yog ob peb tus neeg mob siab rau nrog lub hom phiaj loj los tsim lub ntiaj teb kev ua haujlwm ntse tshaj plaws tsom iav thiab Hnav Hnav Augmented Reality Community. Peb xav kom nkag mus tau yooj yim lub moj khaum ntawm qhov augmented