Cov txheej txheem:

Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC: 8 Cov Kauj Ruam
Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC: 8 Cov Kauj Ruam

Video: Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC: 8 Cov Kauj Ruam

Video: Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC: 8 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC
Tsheb nqaj hlau Lub Rooj Muaj Cov Ntaub Ntawv Qhia - FGC

Txoj haujlwm no yog ua raws qhov kev siv, ntawm qhov ntsuas, ntawm lub tsheb ciav hlau uas tso cai rau cov neeg uas nyob hauv qhov chaw nres tsheb kom paub tias lub rooj zaum twg yog dawb. Txhawm rau ua tus qauv, Arduino UNO software tau siv ua ke nrog Kev Ua Haujlwm rau cov duab nraaj.

Lub tswv yim no yuav ua rau nws tuaj yeem hloov kho lub ntiaj teb kev thauj mus los rau pej xeem, vim nws yuav ua kom zoo dua txhua lub rooj zaum ntawm lub tsheb ciav hlau mus rau qhov siab tshaj plaws, kom ntseeg tau siv txhua lub tsheb laij teb, nrog rau qhov muaj peev xwm khaws cov ntaub ntawv thiab ua cov kev tshawb fawb uas raug, tom qab. nyob rau

Kauj Ruam 1: Tsim Qauv 3D

Tsim Qauv 3D
Tsim Qauv 3D

Ua ntej tshaj plaws peb tau ua tiav kev tshawb fawb ntawm cov qauv tsheb ciav hlau. Nrog txhua cov ntaub ntawv khaws tseg, lub tsheb ciav hlau GTW (tsim los ntawm Stadler Rail) siv ntawm FGC (Ferrocarrils de la Generalitat de Catalunya) tau raug xaiv.

Tom qab ntawd nws tau tsim nrog 3D software PTC Creo tus qauv rau kev luam ntawv 3D tom ntej.

Kauj Ruam 2: Luam Ntawv 3D Qauv thiab Tiav

Luam Ntawv 3D Qauv thiab Tiav
Luam Ntawv 3D Qauv thiab Tiav

Thaum lub tsheb ciav hlau tau tsim, nws tau dhau mus rau 3D luam ntawv. Thaum daim ntawv luam tawm, nws yuav tsum tau txhuam kom ua tiav qhov du.

Txoj haujlwm no tseem tuaj yeem ua tiav nrog cov qauv tsheb ciav hlau uas twb muaj lawm.

Thaum luam tawm, qhov kev ua tiav zaum kawg tau muab.

Kauj Ruam 3: Cheebtsam

Cheebtsam
Cheebtsam

Rau kev txhim kho txoj haujlwm no yuav tsum muaj cov hauv qab no:

- FSR 0.04-4.5LBS (Siab ntsuas).

- 1.1K ohms resistors

Kauj Ruam 4: Coding (Arduino & Ua Haujlwm)

Coding (Arduino & Ua Haujlwm)
Coding (Arduino & Ua Haujlwm)
Coding (Arduino & Ua Haujlwm)
Coding (Arduino & Ua Haujlwm)
Coding (Arduino & Ua Haujlwm)
Coding (Arduino & Ua Haujlwm)

Tam sim no yog lub sijhawm los sau cov cai Arduino uas yuav cia cov ntsuas xa mus rau lub khoos phis tawj uas ua haujlwm uas yuav xa cov ntaub ntawv xov xwm.

Raws li cov cuab yeej peb muaj 4 lub ntsuas qhov ntsuas siab rau arduino uas sib txawv nws qhov kev tiv thaiv raws li lub zog uas tau siv rau lawv. Yog li lub hom phiaj yog ua kom zoo dua ntawm lub teeb liab xa los ntawm lub ntsuas cua (thaum cov neeg caij tsheb zaum) los hloov cov duab nraaj hauv Kev Ua Haujlwm.

Tom qab ntawd, peb tsim cov duab nraaj uas peb tau coj mus rau hauv tus lej tsim ntawm Ferrocarrils de la Generalitat de Catalunya, kom ua raws qhov tseeb hauv txoj hauv kev zoo tshaj plaws.

Hauv kev ua nws tau sau cov cai uas txuas ncaj qha rau software arduino, ua li no, txhua lub sijhawm ib tus neeg zaum ntawm lub rooj zaum, nws hloov xim, tso cai rau tus neeg siv ntawm lub tsheb ciav hlau platform kom paub lub sijhawm tiag tiag lub tsheb ciav hlau muaj cov rooj zaum.

Ntawm no koj tuaj yeem pom coding

ARDUINO:

int lauj = A0; // Txuas tus pin nruab nrab ntawm lub lauj kaub rau lub lauj kaub pinint2 = A1; int lauj 3 = A2; int pot4 = A3; int lectura1; // sib txawv rau khaws cia lub lauj kaub qhov tseem ceeb;

koj lectura2; koj lectura3; koj lectura4;

teeb tsa tsis muaj dab tsi () {// pib ua haujlwm sib txuas lus ntawm 9600 baud tus nqi Serial.begin (9600); }

void loop () {Txoj hlua s = ""; // // Llegir sensor1 lectura1 = analogRead (lauj kaub); // lectura tus nqi analog yog (lectura1> 10) {s = "1"; ncua (100); } lwm {s = "0"; ncua (100); } Serial.println (s);

}

UA NTEJ:

ntshuam ua.serial.*; // lub tsev qiv ntawv no saib xyuas cov lus sib tham Txoj hlua val = ""; PImage s0000, s0001, s0010, s0011, s0100, s0101, s0110, s0111, s1000, s1001, s1010, s1011, s1100, s1101, s1110, s1111; Serial myPort; // Tsim cov khoom los ntawm chav kawm Serial

teeb tsa tsis muaj dab tsi () // qhov no tsuas yog ua ib zaug {fullScreen (); keeb kwm yav dhau (0); // teeb tsa keeb kwm yav dhau xim rau dub myPort = Serial tshiab (qhov no, "COM5", 9600); // muab qhov tsis zoo rau cov khoom ntawm chav kawm txuas, tso cov com uas koj cov arduino txuas nrog thiab tus nqi baud

s0000 = loadImage ("0000.jpg"); s0001 = loadImage ("0001.jpg"); s0010 = loadImage ("0010.jpg"); s0011 = loadImage ("0011.jpg"); s0100 = loadImage ("0100.jpg"); s0101 = loadImage ("0101.jpg"); s0110 = loadImage ("0110.jpg"); s0111 = loadImage ("0111.jpg"); s1000 = loadImage ("1000.jpg"); s1001 = loadImage ("1001.jpg"); s1010 = loadImage ("1010.jpg"); s1011 = loadImage ("1011.jpg"); s1100 = loadImage ("1100.jpg"); s1101 = loadImage ("1101.jpg"); s1110 = loadImage ("1110.jpg"); s1111 = loadImage ("1111.jpg");

s0000.resize (displayWidth, displayHeight); s0001.resize (displayWidth, displayHeight); s0010.resize (displayWidth, displayHeight); s0011.resize (displayWidth, displayHeight); s0100.resize (displayWidth, displayHeight); s0101.resize (displayWidth, displayHeight); s0110.resize (displayWidth, displayHeight); s0111.resize (displayWidth, displayHeight); s1000.resize (displayWidth, displayHeight); s1001.resize (displayWidth, displayHeight); s1010.resize (displayWidth, displayHeight); s1011.resize (displayWidth, displayHeight); s1100.resize (displayWidth, displayHeight); s1101.resize (displayWidth, displayHeight); s1110.resize (displayWidth, displayHeight); s1111.resize (displayWidth, displayHeight);

val = trim (val);} rho tawm kos () {yog (val! = null) {

yog (val.equals ("0001")) {duab (s0001, 0, 0); } lwm yog (val.equals ("0010")) {duab (s0010, 0, 0); } lwm yog (val.equals ("0011")) {duab (s0011, 0, 0); } lwm yog (val.equals ("0100")) {duab (s0100, 0, 0); } lwm tus yog (val.equals ("0101")) {duab (s0101, 0, 0); } lwm yog (val.equals ("0110")) {duab (s0110, 0, 0); } lwm yog (val.equals ("0111")) {duab (s0111, 0, 0); } lwm yog (val.equals ("1000")) {duab (s1000, 0, 0); } lwm yog (val.equals ("1001")) {duab (s1001, 0, 0); } lwm yog (val.equals ("1010")) {duab (s1010, 0, 0); } lwm yog (val.equals ("1011")) {duab (s1011, 0, 0); } lwm yog (val.equals ("1100")) {duab (s1100, 0, 0); } lwm yog (val.equals ("1101")) {duab (s1101, 0, 0); } lwm yog (val.equals ("1110")) {duab (s1110, 0, 0); } lwm yog (val.equals ("1111")) {duab (s1111, 0, 0); } lwm {duab (s0000, 0, 0); }}}

void serialEvent (Serial myPort) // thaum twg cov xwm txheej tshwm sim nws sau {val = myPort.readStringUntil ('\ n'); // xyuas kom tseeb tias peb cov ntaub ntawv tsis khoob ua ntej txuas ntxiv yog tias (val! = null) {// luas qhov chaw dawb thiab cim cov cim (zoo li rov qab nqa tsheb) val = trim (val); println (tau); }}

Kauj ruam 5: Circuit Court

Circuit Court
Circuit Court

Tom qab txhua txoj haujlwm, nws yog lub sijhawm los txuas txhua lub ntsuas nrog Arduino UNO pawg thawj coj.

Cov ntsuas tau muab tso rau ntawm 4 lub rooj (uas yuav tom qab tau npog los ntawm daim ntaub) thiab txuas rau cov xov hlau uas mus ncaj qha rau ntawm motherboard ntawm Arduino UNO. Lub teeb liab tau txais ntawm lub rooj tsavxwm tau xa mus rau lub khoos phis tawj txuas nrog USB uas xa cov ntaub ntawv mus rau Kev Ua Haujlwm hauv lub sijhawm tiag tiag, hloov xim ntawm lub rooj zaum.

Koj tuaj yeem pom schema ntawm kev sib txuas.

Kauj Ruam 6: Kev Xeem Tsab

Thaum cov cai tau raug xa mus rau pawg thawj coj ntawm arduino thiab kev ua haujlwm thiab kev pabcuam arduino tau qhib, cov ntsuas tau ntsuas. Ntawm lub vijtsam koj yuav pom qhov kev hloov pauv ntawm lub rooj zaum vim hloov pauv cov duab ntawm cov zaub qhia paub txog cov rooj zaum nyob thiab tsis muaj.

Kauj ruam 7: Tiag tiag Mock-up

Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up
Tiag tiag Mock-up

Daim ntawv thov tiag tiag yuav sim teeb tsa nws ntawm cov tsheb ciav hlau thiab cov platform ntawm FGC network los pab cov neeg taug kev.

Kauj ruam 8: Txaus siab rau

Zoo siab!
Zoo siab!
Zoo siab!
Zoo siab!

Thaum kawg koj tau ua Force Sensor Train (tsab ntawv) uas tso cai rau tus neeg siv ntawm lub tsheb ciav hlau platform paub tias lub rooj twg muaj nyob rau ntawm lub sijhawm.

Zoo siab txais tos rau yav tom ntej!

Txoj haujlwm tsim los ntawm Marc Godayol & Federico Domenech

Pom zoo: