top of page

Search Results

285 results found with an empty search

  • Any and All Numbers Test

    This program tests the any and all instructions with floating point and integer numbers. < Back Any and All Numbers Test This program tests the any and all instructions with floating point and integer numbers. Program --- Any and All Numbers Test Program --- prog_vars = d/pin1 0 d/pin2 1 d/float1 12.5 d/float2 3.141 d/int1 10 d/int2 0 d/pin_no 0 d/text1 "Jack" d/text2 "Jill" prog_vars. prog_start = print " -------------- " print "all statement test program" prog_start. prog_loop = -- Test 1 Should be TRUE ie /pin_no != 1 /pin1 0 /pin2 1 /pin_no 2 all /pin_no != 1 -> print "Test 1 TRUE CORRECT" else print "Test 1 FALSE WRONG" exitprog enda. -- Test 2 Should be FALSE ie /text1 not = to /text2 all /text1 = /text2 -> print "Test 2 TRUE WRONG" else print "Test 2 FALSE CORRECT" exitprog enda. -- Test 3 Should be TRUE ie /text1 is != /text2 all /text1 != /text2 -> print "Test 3 TRUE CORRECT" else print "Test 3 FALSE WRONG" exitprog enda. -- Test 4 Should be TRUE ie /text1 is "JacK" all /text1 = "Jack" -> print "Test 4 TRUE CORRECT" else print "Test 3 FALSE WRONG" exitprog enda. -- Test 5 Should be TRUE ie /float1 = 12.5 all /float1 = 12.5 -> print "Test 5 TRUE CORRECT" else print "Test 5 FALSE WRONG" exitprog enda. -- Test 6 Should be TRUE ie /float1 > /float2 all /float1 > /float2 -> print "Test 6 TRUE CORRECT" else print "Test 6 FALSE WRONG" exitprog enda. prog_loop. prog_stop = print "Bye" prog_stop.

  • Age Calculator

    This program takes the persons birth year and the current year and calculates their age. It then works out their age if they were born 10 years earlier. < Back Age Calculator This program takes the persons birth year and the current year and calculates their age. It then works out their age if they were born 10 years earlier. Program --- Age Calculator Program Example Uses the birth year and the current year to workout your age. Then it subtracts 10 years from their birth year. --- prog_vars = d/name "Fred" -- name text var with default value d/birth_year 1972 -- year of birth d/current_year 2020 -- the current year d/age 0 -- age in years d/message1 "If you were born 10 years earlier" prog_vars. prog_start = print " .......... " print "Age Program Begin" prog_start. prog_loop = -- Work Out their age sub /current_year /birth_year -> /age print "Hi /name you are /age years old" -- Subtract 10 years from their birth year and recalc. sub /birth_year 10 -> /birth_year print "New birth year /birth_year" -- Work Out their newage sub /current_year /birth_year -> /age -- Use /message1 to hold the message so the lines not too long. print "/message1" print "you would be /age years old" print "Done exiting now!" exitprog prog_loop. prog_stop = exitprog prog_stop.

  • getline Example

    This program prompts the user for their name and displays it to them. It uses the getline command to get the users input from the command line. < Back getline Example This program prompts the user for their name and displays it to them. It uses the getline command to get the users input from the command line. Program --- Name Program get the users name and display it --- prog_vars = d/name "" prog_vars. prog_start = print "Name Program" prog_start. prog_loop = print "What is your name?" getline -> /name print "Your name is: /name hello /name" exitprog prog_loop. prog_stop = print "bye /name" prog_stop.

  • Turbidity Program

    Measures turbidity and displays it on the USER led as colors. < Back Turbidity Program Measures turbidity and displays it on the USER led as colors. Program --- Turbidity Meter Program --- prog_vars = d/count 0 d/turbidity 0 prog_vars. prog_start = pclear print "Program Start" gvr a1 100 0 prog_start. prog_loop = mapi 0 100 1 16 /a1 -> /turbidity "a1 /a1 turbidity /turbidity" d250 l1 /turbidity prog_loop. prog_stop = print "Bye" prog_stop.

  • WiFi Signal Strength using any Statements

    This program uses the /wifisig system variable to display how good the Wifi signal the JackBord has is. It uses the any statement to determine which message to display based upon the strength of the Wifi signal. < Back WiFi Signal Strength using any Statements This program uses the /wifisig system variable to display how good the Wifi signal the JackBord has is. It uses the any statement to determine which message to display based upon the strength of the Wifi signal. Program --- Wifi Signal Strength Program using any This uses the /wifisig system variable and a set of any commands to check the wifi strength, and tell you about it. NOTE: Each time the /wifisig system variable is used it updates the wifi signal reading, so they will vary. --- prog_vars = d/wifi_state "" d/wifi_sig 0 d/runs_to_do 0 d/runs_done 0 d/current_wifi 0 prog_vars. prog_start = print "Wifi Signal Strength Program" /runs_to_do 50 prog_start. prog_loop = -- Reset the wifi state var and get the wifi -- signal level from the /wifisig sys var. /wifi_state "XXX" -- Get the wifi signal strength here once as it can -- change on subsequent calls to the /wifisig sys var. /current_wifi /wifisig any /current_wifi <= -30 -> /wifi_state "V GOOD" any /current_wifi <= -40 -> /wifi_state "GOOD" any /current_wifi <= -50 -> /wifi_state "BETTER" any /current_wifi <= -60 -> /wifi_state "WORSE" any /current_wifi <= -70 -> /wifi_state "LOW" any /current_wifi <= -80 -> /wifi_state "TOO LOW!" print "Wifi /wifi_state /current_wifi" any /runs_done = /runs_to_do -> exitprog inc /runs_done prog_loop. prog_stop = print "Good bye" prog_stop.

  • Simple WiFi Signal

    This program will display the Wifi signal strength received by the JackBord. it will do 100 runs and then stop. It uses the /s_wifisig system variable to get the Wifi signal strength. < Back Simple WiFi Signal This program will display the Wifi signal strength received by the JackBord. it will do 100 runs and then stop. It uses the /s_wifisig system variable to get the Wifi signal strength. Program --- Simple Wifi Signal Program This program will display the Wifi signal strength received by the JackBord. it will do 100 runs and then stop. It uses the /s_wifisig system variable to get the Wifi signal strength. --- prog_vars = d/run_no 0 prog_vars. prog_start = "Wifi Signal Program" prog_start. prog_loop = -- Display the Wifi Signal Strength "Run /run_no Wifi signal /s_wifisig" -- Exit after 100 runs inc /run_no any /run_no >= 100 -> "Run /run_no Time to Exit" exitprog enda. prog_loop. prog_stop = print "Prog STOPPED!" prog_stop.

  • Flash USER LED l1 with Random Colours

    This program flashes the USER LED l1, the one on the front of the JackBord. It will cycle USER LED 1 through the colors 0 to 15. < Back Flash USER LED l1 with Random Colours This program flashes the USER LED l1, the one on the front of the JackBord. It will cycle USER LED 1 through the colors 0 to 15. Program --- Flash USER LED l1 with colors --- prog_vars = d/count 0 d/color 0 prog_vars. prog_start = pclear print "Program Start" prog_start. prog_loop = -- main program loop print "Count /count" inc /count any /count >= 100 -> exitprog inc /color any /color > 15 -> /color 0 /l1 /color prog_loop. prog_stop = print "Bye" prog_stop.

  • Junior Robot Wars Mine 3 Dec 2020

    This is the mine program for the Junior Robot Wars Competition 3 Dec 2020. < Back Junior Robot Wars Mine 3 Dec 2020 This is the mine program for the Junior Robot Wars Competition 3 Dec 2020. Program --- Junior Robot Wars Mine Program 3 Dec 2020 --- prog_vars = d/hits 0 d/hit_result 0 d/health 10 d/flashes 0 d/died 0 prog_vars. prog_start = "Mine Start" coff repeat 10 -> tg c2|d100 -- Setup the bumper pins A1 & A2 btp a1 do_boom btp a2 do_boom hled prog_start. prog_loop = patdog prog_loop. do_boom = --- The mine is triggered work out the health or damage. --- /flashes 0 -- Get a new random number between -6 and 6. rand -6 6 -> /hit_result -- Update the health var add /health /hit_result -> /health -- Flash for neg /hit_result ie deduct health any /hit_result < 0 -> /flashes 2 -- Count no of hits inc /hits print "T /hits TR /hit_result H /health F /flashes" show_hit_color /hit_result /flashes do_boom. show_hit_color /hit_color 0 /hit_flashes 0 = -- All c off coff -- Get abs version of color abs /hit_color -> /hit_color hled repeat /hit_flashes -> ant /hit_color -> = 1 -> sled a3 6 /hit_color 0 255 0 = 2 -> sled a3 6 /hit_color 0 255 255 = 3 -> sled a3 6 /hit_color 255 255 0 = 4 -> sled a3 6 /hit_color 255 0 255 = 5 -> sled a3 6 /hit_color 0 0 255 = 6 -> sled a3 6 /hit_color 0 255 0 -> hled ant. d500 hled repeat. show_hit_color. prog_stop = coff ant /died -> = 1 -> "Died Hits"|c1 1 = 2 -> "Died Health"|c3 1 -> c2 1 ant. rstb prog_stop.

  • Plot Brightness from an LDR on Port B1

    This program plots the brightness readings from an Light Dependent Resistor (LDR) connected to port B1 of the JackBord. The circuit is the LDR, one wire conennected to the 3V power on port B and the other one is attached to port B1. A 100K resistor goes from B1 to ground. < Back Plot Brightness from an LDR on Port B1 This program plots the brightness readings from an Light Dependent Resistor (LDR) connected to port B1 of the JackBord. The circuit is the LDR, one wire conennected to the 3V power on port B and the other one is attached to port B1. A 100K resistor goes from B1 to ground. Program --- Plot Brightness from an LDR on Port B1 --- prog_vars = d/brightness 0 prog_vars. prog_start = print "Plot Light Level from LDR on Port B1" gvr b1 0 100 /brightness 0 prog_start. prog_loop = -- Scale the LDR brightness from 0 to 100 to 0 to 50 -- so it fits in the plot. mapi 0 100 0 50 /b1 -> /brightness -- Plot the LDR Brightness -- Put a max line at 50 tbar B /brightness 50 20 "/b1 = /brightness" d250 prog_loop. prog_stop = print "Good bye" prog_stop.

  • Plot a Voltage Program

    This program uses a graph plot to display the value of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100. < Back Plot a Voltage Program This program uses a graph plot to display the value of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100. Program --- Simple Plot Program This program uses a graph plot to display the value of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100. --- prog_vars = d/Xpos 0 prog_vars. prog_start = pclear print "Program Start" -- show the title ptl 10 10 ^ts=26^ "Simple Plot Program" -- Add a quit button pb 500 10 ^n=Quit^p=exitprog^ -- Setup port pin A1 to be an anaog input and scale between 0 to 100. gvr a1 0 100 prog_start. prog_loop = -- main program loop -- Plot the current value plot 0 50 ^id=V1^n=Voltage^xn=Time^t1n=Volts^xp=/Xpos^v1=/a1^ inc /Xpos d250 prog_loop. prog_stop = ptl 350 0 ^ts=34^ "Bye" prog_stop.

  • Simple Gauge Program

    This program uses a gauge to display the value of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100. Connect the TOP so that POT1 is across 3V and ground and the center pin goes to pin A1 on the JackBord. Turning the pot will change the gauge reading. < Back Simple Gauge Program This program uses a gauge to display the value of a voltage being applied to pin A1. We scale the input voltage to be between 0 and 100. Connect the TOP so that POT1 is across 3V and ground and the center pin goes to pin A1 on the JackBord. Turning the pot will change the gauge reading. Program --- Simple Gauge Program This program uses a gauge to display the value of a voltage being applied to pin A1. --- prog_vars = d/count 0 prog_vars. prog_start = pclear print "Program Start" -- show the title ptl 10 10 ^ts=26^ "Simple Gauge Program" -- Add a quit button pb 500 10 ^n=Quit^p=exitprog^ -- Setup port pin A1 to be an anaog input and scale between 0 to 100. gvr a1 0 100 prog_start. prog_loop = -- main program loop -- show the gauge pg 50 100 /a1 ^min=0^max=100^n=Value^ inc /count prog_loop. prog_stop = print "Bye" ptl 350 50 ^ts=34^ "Bye" prog_stop.

  • Twinkle Star

    Make the USER LED twinkle like a star. This program uses the rand command to generate a random color which is then used to set the color of the USER LED on the front of the JackBord. < Back Twinkle Star Make the USER LED twinkle like a star. This program uses the rand command to generate a random color which is then used to set the color of the USER LED on the front of the JackBord. Program --- Twinkle Star Program Make the USER LED twinkle like a star. --- prog_vars = d/color 0 prog_vars. prog_start = print "Twinkle Star Program." prog_start. prog_loop = -- Get a new random color rand 0 15 -> /color -- Set USER LED to the color l1 /color prog_loop. prog_stop = print "Exit Twinkle" prog_stop.

  • Smart Night Light

    This uses the JackBord block 3s internal USER LEDs to create a smart night light. A button attached to pin A1 is used to set the mode of operation of the light. Mode 1 produces warmer colors because it uses more red light. Mode 2 results in more daylight color because it uses more blue and green light. < Back Smart Night Light This uses the JackBord block 3s internal USER LEDs to create a smart night light. A button attached to pin A1 is used to set the mode of operation of the light. Mode 1 produces warmer colors because it uses more red light. Mode 2 results in more daylight color because it uses more blue and green light. Program --- Smart Night Light Program This uses the JackBord block 3's internal USER LEDs to create a smart night light. A button attached to pin A1 is used to set the mode of operation of the light. --- prog_vars = d/led_no 0 d/red 0 d/green 0 d/blue 0 d/mode 1 prog_vars. prog_start = pclear print "Smart Night Light Program Started" -- turn all USER leds off loff -- Setup the button on A1 to set the mode btp a1 set_mode prog_start. prog_loop = "mode /mode" -- Determien the mode we should be in ant /mode -> = 1 -> mode1 = 2 -> mode2 -> mode1 ant. -- Set the color of the USER LEDs l1 /red /green /blue l2 /red /green /blue l3 /red /green /blue -- Wait a while dly 1000 prog_loop. set_mode = -- called by the button press. -- If we are in mode 1 goto mode 2. ant /mode -> = 1 -> /mode 2 = 2 -> /mode 1 -> /mode 1 ant. print "New Mode /mode" set_mode. mode1 = -- Use more Red colors by using more red in the light. -- and use less of the other colors. rand 100 255 -> /red rand 0 100 -> /green rand 0 100 -> /blue mode1. mode2 = -- Use more daylight colors by using more blue and green in the light. -- and use less red. rand 0 100 -> /red rand 100 255 -> /green rand 100 255 -> /blue mode2. prog_stop = print "prog stopped" prog_stop.

  • PWM Commands

    Command Guide < Back PWM Commands lpwc - List the PWM system channel allocations Purpose List the PWM channel allocations on the esp32. The esp32 can handle a maximum of 6 pwm chans. Syntax lpwc lpwi - List the PWM system settings info Purpose Display the settings being used by the PWM system. Syntax lpwi mfreq - Set PWM freq for the Drive Motors Purpose This sets the pwm frequency for the main drive motors. NOTE: the updated freq gets picked up by the relevant functions. Syntax mfreq freq Arguments freq The frequency to use for the pwm main drive system. 50 to 5000Hz. pfreq - Set PWM freq for the I/O Ports Purpose This sets the pwm freq for the pwm command. Syntax pfreq freq Arguments freq The frequency to use for the pwm system. 50 to 5000Hz. pwm - Pulse width modulation on a pin Purpose pwm allows a pulse width modulated (PWM) signal to be applied to a pin. Syntax pwm #~ duty Arguments #~ The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4 duty The duty cycle from 0 to 100. Pushers No Returns Nothing Examples pwm a1 50 Set pin a1 at 50% pwm d1 75 Set the USER LED at 75% brightness pwm a3 /speed Use the /speed variable to set the pwm duty on pin a3

  • Sensors - Colour Sensor Module

    The TCS34725 colour module allows the JackBord to determine the colour of a surface or object placed near the sensor. < Back Colour Sensor Module The TCS34725 colour module allows the JackBord to determine the colour of a surface or object placed near the sensor. The TCS34725 color module allows the JackBord to determine the color of a surface or object placed near the sensor. Connecting the Sensor to the JackBord The sensor uses the I2C bus on the JackBord, which is located on port D. The diagram below shows the connections between the color sensor and the JackBord. Once you have connected the sensor to the JackBord log into your dashboard and open the command line. Once there we need to type the following commands 1. To turn on the I2C System, type: i2con 2. To find the color sensor, type: f2c This will find the sensor and display a result like the one below. > f2c < Finding I2C Devices.... < TCS34725 RGB Color Sensor at address [41] < Found 1 devices If the sensor is not found check your connections. 3. To get some readings, type: gt you should see something like this: 26 CT COLOR TEMP 7749 7749.00 K 27 LIGHT LUX 845 845.00 lux 28 RED RED 797 797.00 Int 29 GREEN GREEN 1307 1307.00 Int 30 BLUE BLUE 1310 1310.00 Int 31 CLEAR CLEAR 3354 3354.00 Int 32 COLOR COLOR 3354 3354.00 Txt Note the maximum value for all of the channels is 65535. Previous Next

  • sled Example Light Program

    This program works with a single smart RGB led on the TOP. Connect the SLEDs data pin to the SLED pin on port E (pin E1 in some models). It randomly changes the colour of the LED. < Back sled Example Light Program This program works with a single smart RGB led on the TOP. Connect the SLEDs data pin to the SLED pin on port E (pin E1 in some models). It randomly changes the colour of the LED. Program --- sled Example Light Program This program works with a single smart RGB led on the TOP. Connect the SLED's data pin to the SLED pin on port E (pin E1 in some models.) It randomly change the color of the LED. --- prog_vars = d/count 0 d/color 0 prog_vars. prog_start = print "Program Start" -- Set the number of LEDS sledn 1 prog_start. prog_loop = -- main program loop print "Count /count" inc /count any /count >= 1000 -> exitprog -- Set a random color rand 0 15 -> /color -- Set the led sled 1 /color d100 prog_loop. prog_stop = print "Bye" prog_stop.

  • Date and Time Test

    This short program tests the JackBord's date and time commands. < Back Date and Time Test This short program tests the JackBord's date and time commands. Program --- Date & Time Test Program This short program tests the JackBords date and time commands. --- prog_vars = d/count 0 prog_vars. prog_start = pclear print "Date & Time Program Start" prog_start. prog_loop = "Clock /s_clock" "Time Secs /s_tsecs" "Date time /s_dt" "Date /s_date" "Time /s_time" "Day /s_day Month /s_mon Year /s_year Month /s_month Day /s_dname" "Time Hour /s_hh : /s_mm : /s_ss" "Day of the Year /s_doy" "Week of the Year /s_woy" "Day of the Week /s_dow" "Month Name /s_month" "Day Name /s_dname" exitprog prog_loop. prog_stop = print "Bye" prog_stop.

  • Basic Capacitive Soil Moisture Sensor

    This program works with the capacitive soil moisture sensor probe and scales the readings from the sensor so you get soil moisture readings from 0% (dry) to 100% (soaked). < Back Basic Capacitive Soil Moisture Sensor This program works with the capacitive soil moisture sensor probe and scales the readings from the sensor so you get soil moisture readings from 0% (dry) to 100% (soaked). Program --- Basic Capacitive Soil Moisture Sensor Program Get readings from the sensor on pin a1 and scale them between the min and max calibration values to get a reading between 0 and 100. --- prog_vars = d/count 0 -- Calibration values d/min_value 6 d/max_value 56 -- The final soil moisture reading d/soil_moisture 0 prog_vars. prog_start = pclear print "Program Start" -- Setup the sensor on pin a1 gvr a1 100 0 prog_start. prog_loop = -- main program loop get_soil_moisture print "Count /count Soil moisture /soil_moisture" inc /count any /count >= 10 -> exitprog -- Wait 1 sec between readings d1000 prog_loop. get_soil_moisture = -- Get the reading from a1 and scale it mapi /min_value /max_value 0 100 /a1 -> /soil_moisture get_soil_moisture. prog_stop = print "Bye" prog_stop.

  • Gallery

    News Shop EXCITING NEWS!!! We're good to go and now taking orders ! After several y ears of development and testing with schools, homeschoolers, and parents we are proud to announce that the JackBord Pro, JackBord Basic, the Virtual JackBord and a range of sensors on our very own Universal Sensor Interface using our Octagon programming platform are now available. JackBord is the perfect partner to unleash the curiosity and inspire creativity in students of all ages and all abilities through authentic learning. These robust, long life multifunctional electronic devices and educational system helps students and educators with electronics, robotics, programming, science, data logging and analytics, construction, art, games, communication, teamwork. JackBord is the so lution to educators and industry needs for STEM tools that provide kinaesthetic, real world learning experiences to help equip our young learners of all abilities for the future. JackBord, your partner in STEM, opening a world of opportunity Engaging our neurodiverse rangatahi in STEM education STEM Alliance Aotearoa "The JackBord provides an excellent opportunity to engage akōnga in STEM, removing the silo-ed learning of “maths” and “science” lessons through a transdisciplinary project." Read Full Article JackBord system 'unravelling curious minds and imagination' NZ Herald Read Full Article "A unique product, being assembled in Waikanae, is helping to break down the barriers in science, technology, engineering, maths and more, for school children of all abilities and demographics." CRIsIsLab Challenge - Massey University, August 2021 The Crisis Response and Integrated Simulation Science Laboratory (CRISiSLab) is a research and learning laboratory based in the Joint Centre for Disaster Research (JCDR), Massey University, Wellington. In an effort to encourage more students into the field of Technology and Crisis Management, they ran a competition, in which students were required to design and build an earthquake alerting device or system. The purpose of the students’ device was to monitor live data from a Raspberry Shake seismometer, one of which was given to each school, and when it reached a given threshold create an alert that would warn people nearby of the impending earthquake risk. The teams from Paraparaumu College and Te Kura Māori o Porirua used JackBords extensively in their alert devices, in conjunction with JackBord’s programming language Octagon, for data processing and creating their alerting program. The results of the competition saw "Earthquack" from Paraparaumu College win the joint award for the best dashboard , and Te Kura Māori o Porirua win the award for the best alerting device. The Te Kura Maori o Porirua alerting device was based upon Rūaumoko, the god of earthquakes in Māori Mythology, holding a Waka with three warriors in it high above his head. When an alert was triggered the four JackBords used in the alerting device came into action with each one being the responsibility of one or more students. The first JackBord monitored the data coming from the Raspberry Pi Shake and sent an alert to the other 3 JackBords when an earthquake occurred. The second JackBord controlled the three Māori warriors in the waka with the number popping up depending on the severity of the quake. It was also responsible for the LEDs below Rūaumoko which represented the sea. The warriors were controlled using RC servos mounted on JacKano metal parts. The third JackBord controlled the lights on the side of the waka and the fourth was responsible for the alert sound played based upon the strength of the quake. Image: Alerting program in Octagon showing data from the Raspberry Pi Shake plotting in real time.

  • Bumper Robot V2

    This version of the bumper robot has a smart RGB LED strip fitted with 5 LEDs. There is a front and back bumper connected to pins a1 and a2 respectively. If the front bumper is triggered the robot will move backwards and the LEDs will start to flash from the front to the back indicating that the robot is moving backwards. If the back bumper is triggered the robot will start to move forward and the LEDs will flash from the back to the front to indicate the change in direction. < Back Bumper Robot V2 This version of the bumper robot has a smart RGB LED strip fitted with 5 LEDs. There is a front and back bumper connected to pins a1 and a2 respectively. If the front bumper is triggered the robot will move backwards and the LEDs will start to flash from the front to the back indicating that the robot is moving backwards. If the back bumper is triggered the robot will start to move forward and the LEDs will flash from the back to the front to indicate the change in direction. Program --- Bumper Robot Program V2 --- prog_vars = -- Keep track of the number of bumps. d/front 0 d/back 0 -- Track to no of times we have run. d/count 0 d/speed 0 -- Direction timer d/dir_timer 0 d/dir 0 d/total_leds 5 d/led_no 0 d/red 0 d/green 0 d/blue 0 prog_vars. prog_start = print "Bumper Robot Program Setup" -- Reset the buttons rstb -- Setup the front bumper. -- Go back and turn left. btp c1 front_bump btp c2 back_bump bms 50 sledn 10 sledoff prog_start. prog_loop = -- main program loop -- Increase the /count by 1 inc /count /speed /150 -- Change dirtection if it gets stuck. any /dir_timer > 400 -> /dir_timer 0 tgdir enda. -- Set each color to a random value -- rand 0 255 -> /red -- rand 0 0 -> /green -- rand 0 255 -> /blue all /dir = 0 /led_no < 7 -> inc /led_no all /dir = 0 /led_no >= 7 -> /led_no 0 all /dir = 1 /led_no >= 1 -> dec /led_no all /dir = 1 /led_no <= 0 -> /led_no 7 -- "dir /dir /led_no" sled /led_no /red /green /blue prog_loop. front_bump = -- Task for front bumper -- Set each color to a random value rand 0 0 -> /red rand 0 255 -> /green rand 0 0 -> /blue bms -50 lms -10 d500 lms -50 inc /front /dir_timer 0 /dir 1 front_bump. back_bump = -- Task for the back bumper rand 0 255 -> /red rand 0 0 -> /green rand 0 0 -> /blue bms 50 rms 10 d500 rms 50 inc /back /dir_timer 0 /dir 0 back_bump. prog_stop = print "Bye Front /front Back /back" -- Clear the buttons rstb -- Stop the robot stop prog_stop.

bottom of page