
Taula de continguts:
2025 Autora: John Day | [email protected]. Última modificació: 2025-01-23 14:37

Programarem el sonar de Walter
Pas 1:
Aquest és un vídeo tutorial que segueix els passos instructius.
Pas 2:

Modificarem el codi de microbot Walter perquè puguem tenir un sonar que funcioni.
Pas 3:

Obriu la pestanya d'entrades i seleccioneu el botó Activat Premeu l'ordre que he ressaltat.
Pas 4:



Necessitarem 2 d'aquestes ordres, assegureu-vos de canviar un dels botons a B i deixar l'altre a A.
Pas 5:

Obriu la pestanya variables i feu clic a fer una variable
Pas 6:



Quan feu clic a "Fes una variable", us demanarà que la poseu per posar-la fàcilment. Només cal que l'anomeneu Botó i, a continuació, premeu D'acord, hauríeu de veure que apareixen 3 ordres.
Pas 7:


Arrossegueu l'ordre Estableix el botó a l'ordre Botó activat com he mostrat.
Pas 8:

Obriu la pestanya lògica i agafeu l'ordre que he ressaltat.
Pas 9:


Substituïu l'ordre Button per l'ordre nou.
Pas 10:



Seleccioneu la variable de botó i substituïu la primera 0. Podríeu trigar un parell d’intents perquè s’adopti a la parada correcta.
Pas 11:



Obriu la pestanya de variables i crearem una nova variable anomenada Sonar.
Pas 12:



Aneu a les extensions i cerqueu el sonar i trieu el que he ressaltat.
Pas 13:


Agafeu l'ordre set Sonar i arrossegueu-lo a sota de la sentència if.
Pas 14:



Arrossegueu l'ordre Sonar a la variable sonar.
Pas 15:




A continuació, canviarem les variables de l'ordre sonar.
Pas 16:


Obriu la pestanya lògica i arrossegueu l'ordre if else a l'ordre Sonar.
Pas 17:



Obriu la pestanya lògica i arrossegueu l'ordre per substituir la sentència veritable.
Pas 18:



Arrossegueu la variable de sonar i substituïu la declaració real.
Pas 19:


Arrossegueu l'ordre servo continu sota la sentència second if.
Pas 20:




Feu clic a Avançat i obriu la pestanya de control. A continuació, arrossegueu-lo sota les 2 primeres ordres de servo continu.
Pas 21:



Arrossegueu el segon conjunt d'ordres contínues sota l'ordre d'espera.
Pas 22:



Afegiu un temps d'espera al segon conjunt d'ordres de servo continu. A continuació, arrossegueu el tercer conjunt d'ordres contínues sota l'ordre first else.
Pas 23:




Suprimiu les altres sentències i deixeu la sentència else if i les ordres servo stop.
Pas 24:

Arrossegueu l'ordre stop servo a sota de la sentència else if.
Pas 25:


Obriu la pestanya lògica i arrossegueu una ordre a la ranura.
Pas 26:


Arrossegueu una variable de botó per substituir el 0
Pas 27:




Ara anàvem a canviar algunes de les variables.
Pas 28:

Així ha de ser el codi acabat.
Recomanat:
Sonar MIDI "Theremin": 10 passos (amb imatges)

"Theremin" del sonar MIDI: es tracta d'un instrument musical que utilitza dos sensors de distància del sonar per controlar el to i la qualitat de les notes. No es tracta realment d’un Theremin, per descomptat, sinó de " Theremin " s'ha convertit en el terme genèric per als instruments que es toquen agitant les mans a
Walter the Microbot Bot Moviment bàsic: 26 passos

Moviment bàsic de Walter the Microbot Bot: programarem Walter the Micro: Bot
Bot de dibuix de línies BT construït a la paperera: el meu bot: 13 passos (amb imatges)

Bot de dibuix de línies BT construït a la paperera: el meu robot: Hai amics després d'un llarg buit d'uns 6 mesos aquí, tinc un nou projecte. Fins a la finalització de Cute Drawing Buddy V1, SCARA Robot - Arduino i planejo un altre bot de dibuix, l'objectiu principal és cobrir un gran espai per dibuixar. Braços robòtics tan fixos c
WALTER (Concurs Arduino): 5 passos (amb imatges)

WALTER (Concurs d’Arduino): Voteu-me pel Concurs d’Arduino 2017 [Si us plau, disculpeu el meu anglès] M’agrada molt la popular configuració de 2 servos d’insectes arduino a youtube. Quan ho vaig mirar, sempre recordo el que van fer els nois robòtics de BEAM molt abans que aquella configuració fos favorita. Aquests p
Com fer un bot paral·lel BOE-Bot amb el xip bàsic de segell: 7 passos

Com fer un Parallax BOE-Bot amb el xip de segell bàsic: aquest instructiu mostra la construcció i la modificació del robot de segell bàsic Parallax BOE-Bot