Lego Boost Coding

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

ATOMIC: FLOW BLOCKS

START BLOCK

TRIGGER ON TRUE CONDITION

TRIGGER ON FLAG NUBER

CALL FLAG NUMBER

WAIT FOR TIME (IN SECONDS)

WAIT FOR TRUE CONDITION

LOOP FOR NUMBER COUNT

LOOP WHILE CONDITION IS TRUE

LOOP FOREVER

IF CONDITION TRUE EXECUTE TOP SEQUCEN ELSE EXECUTE BOTTOM


SEQUENCE.

STOP ALL OTHER STRIPS

STOP ALL
ATOMIC: SENSOR BLOCKS

TRIGGER ON COLOR EQUAL TO

WAIT FOR COLOR EQUAL TO

REPORT CURRENT COLOR SEEN BY SENSOR

TRIGGER ON DISTANCE LESS THAN

WAIT FOR DISTANCE LESS THAN

REPORT CURRENT DISTANCE FROM SENSOR

REPORT CURRENT AMBIENT LIGHT LEVEL

TRIGGER ON SOUND LEVEL GREATER THAN

WAIT FOR SOUND LEVEL GREATER THAN

REPORT CURRENT SOUND LEVEL

TRIGGER ON HUB ORIENTATION EQUAL TO

WAIT FOR HUB ORIENTATION EQUAL TO

REPORT CURRENT HUB ORIENTATION


ATOMIC: SENSOR BLOCKS

REPORT CURRENT HUB ANGLE IN THE X DIMENSION (-90..90)

REPORT CURRENT HUB ANGLE IN THE Y DIMENSION (-90..90)

REPORT CURRENT EXTERNAL MOTOR SPEED

REPORT CURRENT EXTERNAL MOTOR POSITION

RESET EXTERNAL MOTOR POSITION TO NUMBER

REPORT CURRENT HUB MOTOR SPEED

REPORT CURRENT HUB MOTOR POSITION

RESET HUBS MOTORS POSITION TO NUMBER

REPORT CURRENT MOTOR A SPEED

REPORT CURRENT MOTOR A POSITION

RESET MOTOR A POSITION TO NUMBER

REPORT CURRENT MOTOR B SPEED

REPORT CURRENT MOTOR A POSITION RESET MOTOR B POSITION TO


NUMBER
ATOMIC: MOTOR BLOCKS

RUN EXTERNAL MOTOR WITH SPEED (-100..100) FOR


TIME (IN SECONDS)

RUN EXTERNAL MOTOR WITH SPEED (-100..100) FOR


DISTANCE (IN DEGREES)

START EXTERNAL MOTOR WITH SPEED (-100..100)

STOP EXTERNAL MOTOR

MOVE HUB WITH MOTOR A SPEED (-100..100) AND MOTOR


B SPEED (-100..100) FOR TIME (IN SECONDS)

MOVE HUB WITH MOTOR A SPEED (-100..100) AND MOTOR


B SPEED (-100..100) FOR DISTANCE (IN DEGREES)

MOVE HUB WITH SPEED (-100..100) AND STEERING


(-100..100) FOR TIME (IN SECONDS)

MOVE HUB WITH SPEED (-100..100) AND STEERING


(-100..100) FOR TIME (IN DEGREES)

START MOVING HUB WITH MOTOR A SPEED (-100..100)


AND MOTOR B SPEED (-100..100)

START MOVING HUB WITH SPEED (-100..100) AND


STEERING (-100..100)

STOP MOVEING HUB


ATOMIC: MOTOR BLOCKS

RUN MOTOR A WITH SPEED (-100..100) FOR


TIME (IN SECONDS)

RUN MOTOR A WITH SPEED (-100..100) FOR


DISTANCE (IN DEGREES)

START MOTOR A WITH SPEED (-100..100)

STOP MOTOR A

RUN MOTOR B WITH SPEED (-100..100) FOR


TIME (IN SECONDS)

RUN MOTOR B WITH SPEED (-100..100) FOR


DISTANCE (IN DEGREES)

START MOTOR B WITH SPEED (-100..100)

STOP MOTOR B
ATOMIC: SOUND AND LIGHT BLOCKS

SET HUB LIGHT TO COLOR

SET SENSOR LIGHT TO COLOR

PLAY SOUND FROM SOUND LIBRARY

PLAY SOUND FROM SOUND LIBRARY WITH CURRENT FILTERS

SET PITCH FILTER (-100..100)

SET DISTORTION FILTER (0..100)

SET ECHO FILTER (0..100)

CLEAR FILTERS
ATOMIC: MATH BLOCKS

READ VARIABLE (ICON)

WRITE TO VARIABLE (ICON) WITH NUMBER

RANDOMIZE BETWEEN FIRST NUMBER AND SECOND NUMBER

NUMBER EQUAL TO NUMBER

NUMBER LESS THAN NUMBER

NUMBER GREATER THAN NUMBER

NUMBER NOT EQUAL TO NUMBER

NUMBER PLUS NUMBER

NUMBER MINUS NUMBER

NUMBER MULTIPLY WITH NUMBER

NUMBER DIVIDE BY NUMBER


GETTING STARTED BLOCKS

START BLOCK

WAIT FOR TIME

TRIGGER ON SENSOR LESS THAN

MOVE 1 GRID SPACE FORWARD

MOVE BACK

MOVE FORWARD HALF A GRID AND TURN 45 DEGREES TO THE LEFT

MOVE FORWARD HALF A GRID AND TURN 45 DEGREES TO THE RIGHT

ROTATE 180 DEGREESTO THE RIGHT

MOVE FAST 360 DEGREES TO THE LEFT

MOVE FAST FORWARD 1 GRID SPACE MUSIC SOUND

MOVE FAST BACK 1 GRID SPACE START PROPELLER

GREETING SOUND ROTATE PROPELLER

HORN SOUND FART


VERNIE: FLOW BLOCKS

START BLOCK

TRIGGER ON FLAG

CALL FLAG

WAIT FOR TIME

LOOP FOR COUNT

LOOP FOREVER

STOP ALL OTHER STRIPS

STOP ALL
VERNIE: SENSOR BLOCKS

TRIGGER ON HANDSHAKE

WAIT FOR HANDSHAKE

TRIGGER ON DIZZY

TRIGGER ON EXHAUSTED

TRIGGER ON INACTIVITY

TRIGGER ON COLOR

WAIT FOR COLOR

TRIGGER ON DISTANCE

WAIT FOR DISTANCE

TRIGGER ON SOUND LEVEL

WAIT FOR SOUND LEVEL

WAIT FOR BUTTON


VERNIE: MOVEMENT BLOCKS

MOVE NUMBER OF GRID SPACE FORWARD

MOVE NUMBER OF GRID SPACE BACK

ROTATE NUMBER OF DEGREES TO THE LEFT

ROTATE NUMBER OF DEGREES TO THE RIGHT

MOVE IN AN ARC TO THE LEFT. VERNIE SHOULD END UP NUMBER OF


GRID SPACE FORWARD, NUMBER GRID SPACE TO THE LEFT AND BE
ROTATED 90 DEGREES TO THE LEFT.

MOVE IN AN ARC TO THE RIGHT. VERNIE SHOULD END UP NUMBER OF


GRID SPACE FORWARD, NUMBER GRID SPACE TO THE LEFT AND BE
ROTATED 90 DEGREES TO THE RIGHT.

ROTATE SLOWLY NUMBER OF DEGREES TO THE LEFT

ROTATE FAST NUMBER OF DEGREES TO THE RIGHT.

ROTATE RANDOM AMOUNT OF DEGREES

MOVE NUMBER OF GRID SPACE FAST FORWARD

SET HEAD POSITION TO LOOK LEFT WITH SPEED

SET HEAD POSITION TO LOOK STRAIGHT WITH SPEED

SET HEAD POSITION TO LOOK RIGHT WITH SPEED

MOVE HEAD RANDOMLY


VERNIE: SOUND BLOCKS

SMALL TALK PHRASES

EXCITED PHRASES

HAPPY PHRASES

QUESTION PHRASES

BASIC PHRASES

SPECIAL PHRASES

FEELING BAD PHRASES

ANGRY PHRASES

COWBOY PHRASES

COP QUESTION PHRASES

POLICE OFFICER PHRASES CROWD REACTIONS SOUNDS

COOL PHRASES PLAY MUSIC

PLAY SOUND FROM


BEATBOXING SOUND LIBRARY
VERNIE: ACTION BLOCKS

SHOOT

DANCE SLOW

DANCE FAST

DISCO LIGHTS

FART

PUNCH

ANGRY VERNIE (EDITABLE)

EXCITED VERNIE (EDITABLE)

HAPPY VERNIE (EDITABLE)

SAD VERNIE (EDITABLE)

ACTIVATION
VERNIE: INTERACTION BLOCKS

AIMING LEFT/RIGHT UNTIL A LOUD SOUND IS HEARD

DUEL WITH VERNIE TO SEE WHO IS FASTER


User should press the orange button on the tablet as soon as Vernies light turns green.

SHOW VERNIE YOUR IDENTIFICATION


The user just needs to put something infront of the sensor on Vernie’s chest

USE THE SLIDER TO MAKE SCRATCHING SOUNDS

TAKE CONTROL OF VERNIE TO RACE THROUGH A TRACK.


Hold down the button to speed up, let go to slow down. Use slider to control steering.

MAKE A GOLF SWING.


Equip Vernie with his golf club in his right hand

USE THE JOYSTICK TO MOVE VERNIE AROUND

MOVE UNTIL WALL


Vernie will move until there is something in front of his sensor.
VERNIE: MATH BLOCKS

COUNTDOWN

RANDOMIZE BETWEEN FIRST NUMBER AND SECOND NUMBER


FRANKIE: FLOW BLOCKS

START BLOCK

TRIGGER ON FLAG

CALL FLAG

WAIT FOR TIME

LOOP FOR COUNT

LOOP FOREVER

STOP ALL OTHER STRIPS

STOP ALL
FRANKIE: SENSOR BLOCKS

TRIGGER ON MILKBOTTLE COLOR

TRIGGER ON CANDLE COLOR

TRIGGER ON HEAD UP ORIENTATION

TRIGGER ON LYING ON BACK ORIENTATION

TRIGGER ON TAIL UP ORIENTATION

TRIGGER ON PETTING

TRIGGER ON INACTIVITY

TRIGGER ON COLOR

WAIT FOR COLOR

TRIGGER ON DISTANCE

WAIT FOR DISTANCE

TRIGGER ON SOUND LEVEL

WAIT FOR SOUND LEVEL


FRANKIE: MOVEMENT BLOCKS

SET EYES TO LOOK LEFT WITH SPEED

SET EYES TO LOOK STRAIGHT DOWN WITH SPEED

SET EYES TO LOOK RIGHT WITH SPEED

WAG TAIL WITH SPEED

STAND UP

SIT DOWN
FRANKIE: SOUND BLOCKS

HARMONICA TONE

HARMONICA RIFFS NUMBER

FRANKIE SINGING BLUES

FRANKIE SINGING BIRTHDAY SONG

BACKING MUSIC INTRO

BACKING MUSIC

PLAY SOUND FROM


SOUND LIBRARY
FRANKIE: ACTION BLOCKS

HAPPY

EXCITED

PURRING

DRINKING

EATING

SLEEPING

SURPRISED

SAD

ANNOYED

ANGRY

FIERCE
FRANKIE: ACTION BLOCKS

INACTIVE

BLOW

FART

BURP

PHARAOH (EDITABLE)

ANGRY (EDITABLE)

PURRING AND HAPPY (EDITABLE)


FRANKIE: INTERACTION BLOCKS

NEED FOR MILKBOTTLE

NEED FOR WHITE FISH

NEED FOR BEING HELD UP

NEED FOR LYING DOWN

HARMONICA RIFF
Riff depends on color currently seen
FRANKIE: MATH BLOCKS

RANDOMIZE BETWEEN FIRST NUMBER AND SECOND NUMBER


GUITAR 4000: FLOW BLOCKS

START BLOCK

WAIT FOR TIME

LOOP FOR COUNT

LOOP FOREVER
GUITAR 4000: SENSOR BLOCKS

TRIGGER ON STRUM UP OR DOWN

TRIGGER ON STRUMMING SPEED

TRIGGER ON STRUM UP OR DOWN AND IN THE YELLOW FRET

TRIGGER ON STRUM UP OR DOWN AND IN THE GREEN FRET

TRIGGER ON STRUM UP OR DOWN AND IN THE RED FRET

TRIGGER ON STRUM UP OR DOWN AND IN THE BLUE FRET

TRIGGER ON STRUM UP OR DOWN AND IN THE WHITE FRET

TRIGGER ON GUITAR ORIENTATION UP

TRIGGER ON 1ST BEAT IN A 4/4 TIME SIGNATURE

TRIGGER ON 2ND AND 4TH BEAT IN A 4/4 TIME SIGNATURE

TRIGGER ON 3 TIMES IN A 4/4 TIME SIGNATURE

TRIGGER ON EACH BEAT IN A 4/4 TIME SIGNATURE


GUITAR 4000: SENSOR BLOCKS

TRIGGER ON 5 TIMES IN A 4/4 TIME SIGNATURE

TRIGGER ON 7 TIMES IN A 4/4 TIME SIGNATURE

TRIGGER ON 9 TIMES IN A 4/4 TIME SIGNATURE

TRIGGER ON 12 TIMES IN A 4/4 TIME SIGNATURE

TRIGGER ON TAP

REPORT THE GUITAR FRET DISTANCE

REPORT THE GUITAR ANGLE IN THE Y DIMENSION

REPORT THE WHAMMY BAR POSITION

REPORT THE WHEEL POSITION


GUITAR 4000: SOUND BLOCKS

ACUSTIC GUITAR CHORDS

ACUSTIC GUITAR CHORDS PLAYED WITH RHYTHM

ACUSTIC GUITAR CHORDS PLAYED WITH PICKERING

ACUSTIC GUITAR CHORDS PLAYED WITH A GALLOPING RHYTHM

DISTROTED GUITAR CHORD STRUMMED UP

DISTROTED GUITAR CHORD STRUMMED DOWN

DISTROTED GUITAR CHORD PLAYED WITH RHYTHM

ELECTRIC GUITAR CHORDS

ELECTRIC GUITAR CHORDS PLAYED WITH RHYTHM

ELECTRIC GUITAR CHORDS PLAYED WITH PICKERING

BASS GUITAR TONE

BASS GUITAR CHORDS PLAYED WITH PICKERING

SOLO RIFF NUMBER


GUITAR 4000: SOUND BLOCKS

VIOLIN SOUND AT SPEED

BASS DRUM SOUNDNUMBER

SNARE DRUM/TOM TOM DRUM SOUND NUMBER

CYMBAL SOUND NUMBER

PERCUSSION SOUND NUMBER

FART CHORDS

ANIMAL SOUND NUMBER

PLAY MUSIC

CROWD REACTIONS SOUNDS

SET PITCH FILTER

SET DISTORTION FILTER

SET ECHO FILTER

PLAY SOUND FROM


SOUND LIBRARY
GUITAR 4000: ACTION BLOCKS

ACUSTIC GUITAR
Chord depends on distance on guitar fret

ACUSTIC GUITAR PLAYED WITH RHYTHM


Chord depends on distance on guitar fret

ACUSTIC GUITAR PLAYED WITH PICKERING


Chord depends on distance on guitar fret

ACUSTIC GUITAR PLAYED WITH GALLOPING RHYTHM


Chord depends on distance on guitar fret

DISTROTION GUITAR
Chord depends on distance on guitar fret

DISTROTION GUITAR PLAYED WITH RHYTHM


Chord depends on distance on guitar fret

ELECTRIC GUITAR
Chord depends on distance on guitar fret

ELECTRIC GUITAR PLAYED WITH RHYTHM


Chord depends on distance on guitar fret

ELECTRIC GUITAR PLAYED WITH PICKERING


Chord depends on distance on guitar fret

BASS GUITAR
Tone depends on distance on guitar fret

BASS GUITAR PLAYED WITH PICKERING


Tone depends on distance on guitar fret
SCRATCHING

SOLO GUITAR FART


Riff depends on distance on guitar fret Chord depends on distance on guitar fret

VIOLIN DISCO LIGHTS


Sound depends on speed of strumming
MTR4: FLOW BLOCKS

START BLOCK

TRIGGER ON FLAG

CALL FLAG

WAIT FOR TIME

LOOP FOR COUNT

LOOP FOREVER

STOP ALL OTHER STRIPS

STOP ALL
MTR4: SENSOR BLOCKS

TRIGGER ON COLOR

WAIT FOR COLOR

TRIGGER ON DISTANCE

WAIT FOR DISTANCE

TRIGGER ON SOUND LEVEL

WAIT FOR SOUND LEVEL

WAIT FOR BUTTON


MTR4: MOVEMENT BLOCKS

MOVE NUMBER OF GRID SPACE FORWARD

MOVE NUMBER OF GRID SPACE BACK

ROTATE NUMBER OF DEGREES TO THE LEFT

ROTATE NUMBER OF DEGREES TO THE RIGHT

MOVE IN AN ARC TO THE LEFT. VERNIE SHOULD END UP NUMBER OF


GRID SPACE FORWARD, NUMBER GRID SPACE TO THE LEFT AND BE
ROTATED 90 DEGREES TO THE LEFT.

MOVE IN AN ARC TO THE RIGHT. VERNIE SHOULD END UP NUMBER OF


GRID SPACE FORWARD, NUMBER GRID SPACE TO THE LEFT AND BE
ROTATED 90 DEGREES TO THE RIGHT.

ROTATE SLOWLY NUMBER OF DEGREES TO THE LEFT

ROTATE FAST NUMBER OF DEGREES TO THE RIGHT.

MOVE NUMBER OF GRID SPACE FAST FORWARD


MTR4: SOUND BLOCKS

CROWD REACTIONS SOUNDS

PLAY MUSIC

PLAY SOUND FROM


SOUND LIBRARY
MTR4: ACTION BLOCKS

SHOOT

DANCE SLOW

DANCE FAST

DISCO LIGHTS

FART

PUNCH

ANGRY VERNIE

EXCITED VERNIE

HAPPY VERNIE

SAD VERNIE

ACTIVATION

DQW

QWDQW
MTR4: INTERACTION BLOCKS

AIMING LEFT/RIGHT UNTIL A LOUD SOUND IS HEARD

TAKE CONTROL OF VERNIE TO RACE THROUGH A TRACK.


Hold down the button to speed up, let go to slow down. Use slider to control steering.

USE THE JOYSTICK TO MOVE VERNIE AROUND

USE THE SLIDER TO MAKE SCRATCHING SOUNDS

MOVE UNTIL WALL


Vernie will move until there is something in front of his sensor.
MTR4: MATH BLOCKS

RANDOMIZE BETWEEN FIRST NUMBER AND SECOND NUMBER


AUTO BUILDER: FLOW BLOCKS

START BLOCK

TRIGGER ON FLAG

CALL FLAG

WAIT FOR TIME

LOOP FOR COUNT

LOOP FOREVER

STOP ALL OTHER STRIPS

STOP ALL
AUTO BUILDER: SENSOR BLOCKS

TRIGGER ON COLOR

WAIT FOR COLOR

TRIGGER ON DISTANCE

WAIT FOR DISTANCE

TRIGGER ON SOUND LEVEL

WAIT FOR SOUND LEVEL


AUTO BUILDER: MOVEMENT BLOCKS

MOVE CONVEY BELT WITH SPEED FOR TIME (IN SECONDS)

MOVE CONVEY BELT WITH SPEED TO POSITION

PICK UP BRICK

PLACE BRICK

MOVE GRAPPER UP WITH SPEED

MOVE GRAPPER DOWN WITH SPEED

MOVE GRAPPER WITH SPEED TO POSITION

ROTATE SPINNER WITH SPEED FOR TIME (IN SECONDS)


AUTO BUILDER: SOUND BLOCKS

CROWD REACTIONS SOUNDS

PLAY MUSIC

PLAY SOUND FROM


SOUND LIBRARY
AUTO BUILDER: ACTION BLOCKS

PICK UP BLACK 2X4 BRICK

PICK UP GREEN 2X2 BRICK

PICK UP BLACK 4X4 WITH ANGLE PLATE

PICK UP GRAY 2X2 PLATE

PICK UP WHITE 2X4 BRICK WITH PRINT

ASSEMBLE A RANDOM MINI VERNIE

DISPLAY MINI VERNIE

PUSH OUT MINI VERNIE


AUTO BUILDER: INTERACTION

AIMING LEFT/RIGHT UNTIL A LOUD SOUND IS HEARD

DUEL WITH VERNIE TO SEE WHO IS FASTER


User should press the orange button on the tablet as soon as Vernies light turns green.
AUTO BUILDER: MATH BLOCKS

COUNTDOWN

RANDOMIZE BETWEEN FIRST NUMBER AND SECOND NUMBER


EXAMPLE OF IF ELSE
EXAMPLE OF FLAGS
EXAMPLE OF VARIABLE
EXAMPLE OF PITCH FILTERS
EXAMPLE OF CALIBRATING AND USING TO POSITION

EXAMPLE OF CREATING A MODEL BLOCK


EXAMPLE OF CREATING A REPORTER
EXAMPLE OF CREATING A TRIGGER

You might also like