top of page

Search Results

255 items found for ""

  • Home | JackBord Learning

    JackBord is the ultimate tool for teaching and learning STEM subjects for those aged 9 and above! Opening a world of opportunity for young people by delivering fun and authentic learning experiences for curious and creative minds of ALL abilities, creating pathways to careers in science, engineering and technology Authentic learning Jackbord focuses on learning the fundamentals through growing a student's practical skills in electronics, coding, sensors and control, with hands on lessons and projects The Jackbord system is specifically designed to enable students from any background and ability to confidently explore and learn Science, Technology, Engineering and Maths in an applied and fun way Your partner in STEM Inventor Jack Penman wanted to help learners of all abilities and backgrounds to realise their potential to become tomorrow's innovators, scientists and engineers. ​ He didn't want them to face the same barriers he experienced as a student. ​ "Those that think and learn differently are the ones who will make a difference to solving the worlds problems" ​ So he invented JackBord, a powerful, unique, enduring tool and system that will excite, inspire and partner students throughout their learning journey to confidently explore science, create engineering projects, learn about electronics, develop programming skills, master robotics, analyse data, and have fun doing so. ​ “Let’s deliver them a path that can take them to a variety of destinations, limited only by their imaginations.” Limited only by your imagination With the incredibly powerful Jac kBord, supported by extensive easy to follow guid es and activities, the possibilities for learning and exploring are virtually endless. ​ We support you to master STEM so that you dare to dream, explore, develop and realise your imagination. ​ Engage in forums, share your projects with us and other JackBorders. ​ The world needs y ou! to take on science, technology and engineering. JackBord will partner with you to get there . Jack spoke about his own learning experiences and challenges, and why he created Jackbord at TEDx Kapiti in a talk titled "Why I'm terrified of being normal " Dashboard JackBorders Site SHOP Educators are able to deliver curriculum and qualifications (and learn themselves!) We don't set out to be educators, however teachers will find they can easily apply our activities to meet curriculum and provide qualifications. Jack's detailed yet easy to follow videos mean that students (and teachers) can learn without assistance or further guidance. JackBord is ideal for teacher professional development. Whilst our guides and activities are designed for self learning we provide online support throughout your journey. Your partner in STEM. more..... Curious about what our users think? Here are a few testimonials from teachers and students! Jackano Jacobs tank Soccer Jackano 1/7

  • Combined Any All Example

    < Back Combined Any All Example In this example we have a car and our program has to check that, before the driver can move the car, the following conditions must be met: Condition OK Value Seatbelt is on 1 Doors closed 1 The car cannot be driven if the above are not all 1. But we also have an emergency option. This is normally 0 and is 1 in the event of an emergency, in which case the car can still be driven even if the other conditions are not met. Program --- Combined Any All example. To be allowed to drive the car the /belt and /doors vars must be 1. But if the /emergency var is 1 we can then drive regardless of the /belt or /doors variables value. --- prog_vars = d/emergency 0 d/belt 0 d/doors 0 -- 1 = NO 2 = YES can drive d/drive_ok 0 -- Test Message Array d/test_message[3] "" prog_vars. prog_start = pclear -- Set the two test messages. /test_message[1] "Cant Drive" /test_message[2] "Can Drive" -- Stop by default /drive_ok 0 print "Car Drive Example" prog_start. prog_loop = -- Test 1 > ALL OK Can drive /belt 1 /doors 1 /emergency 0 do_drive_test "Test 1 Result /drive_ok /test_message[/drive_ok]" -- Test 2 > Cant drive no belt /belt 0 /doors 1 /emergency 0 do_drive_test "Test 2 Result /drive_ok /test_message[/drive_ok]" -- Test 3 > Can drive despite no belt & doors because -- /emergency is 1 /belt 0 /doors 0 /emergency 1 do_drive_test "Test 3 Result /drive_ok /test_message[/drive_ok]" exitprog prog_loop. do_drive_test = -- Test all of the conditions and set the /drive_ok var -- with the result. any /emergency = 1 all /belt = 1 /doors = 1 -> -- CAN drive /drive_ok 2 else -- CANT drive /drive_ok 1 enda. do_drive_test. prog_stop = print "Done exiting now!" prog_stop.

  • Basic 90-Degree Turn

    < Back Basic 90-Degree Turn This program should see the robot be able to turn 90 degrees to the left and 90 degrees to the right. Program --- Basic 90 degrees Turn Program This program should see the robot be able to turn 90 degrees to the left and 90 degrees to the right. --- prog_vars = d/count 0 prog_vars. prog_start = pclear print "Basic Drive Program Start" stop prog_start. prog_loop = left_turn_90deg -- right_turn_90deg exitnow prog_loop. left_turn_90deg = -- The robot should turn 90 degrees to the left. -- Adjust the delay value in the dly command to -- make the robot turn to the left by 90 degrees. stop rms 50 dly 250 -- change this delay to make the turn work stop left_turn_90deg. right_turn_90deg = -- The robot should turn 90 degrees to the right -- adjust the delay value in the dly command to -- make the robot turn to the right by 90 degrees. stop lms 50 dly 250 -- change this delay to make the turn work stop right_turn_90deg. prog_stop = print "Bye" prog_stop.

  • Moving Circle

    < Back Moving Circle Use the TOP to connect the POT1 to pin A1 and POT2 to pin A2. The LEFT POT will control the balls position on the X-axis and the RIGHT POT will control the balls position on the Y-axis. Program --- Moving Circle Program Use the TOP to connect the POT1 to pin A1 and POT2 to pin A2. The LEFT POT will control the balls position on the Xaxis and the RIGHT POT will control the balls position on the Yaxis. --- prog_vars = d/count 0 d/display_width 874 d/display_height 630 prog_vars. prog_start = pclear print "Moving Circle Program" gvr a1 0 /display_width -- Y-axis up and Down gvr a2 0 /display_height -- Xaxis left and right prog_start. prog_loop = -- main program loop -- Display the X and Y values ptl 10 10 "X /a1 Y /a2" -- Display the orange ball on the Show page at the position -- set by the values of A1 and A2. pcr /a1 /a2 50 ^id=cat^fc=orange^ prog_loop. prog_stop = print "Bye" prog_stop.

  • Any Statement Example

    < Back Any Statement Example In this example we check the value of /count against 10 and quit when /count is 10. Program -- Any example no 1 prog_vars = d/count 0 prog_vars. prog_start = print "Any example no 1" prog_start. prog_loop = inc /count print "Count /count" any /count >= 10 -> exitprog prog_loop. prog_stop = print "Bye" prog_stop.

  • Smart LED Random Flashing

    < Back Smart LED Random Flashing Smart LED Random Flashing Program This program has 6 WS2812B smart LEDs connected to port A pin a1. It will cycle the LEDs through random colors. Program --- Smart LED Random Flashing Program This program has 6 WS2812B smart LED's connected to port A pin a1. It will cycle the LEDs through random colors. --- prog_vars = d/led_no 0 d/red 0 d/green 0 d/blue 0 prog_vars. prog_start = print "Smart LED Program Started" -- turn all 6 leds off sled a1 6 0 /red /green /blue prog_start. prog_loop = -- Set each color to a random value rand 0 255 -> /red rand 0 255 -> /green rand 0 255 -> /blue -- Set the LEDs color -- /led_no is the LED we are setting. sled a1 6 /led_no /red /green /blue -- Inc to the next LED and then start again. any /led_no >= 6 -> /led_no 0 else inc /led_no enda. prog_loop. prog_stop = print "prog stopped" prog_stop.

  • Bumper Robot V2

    < 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.

  • Car Program with From Obsticle Avoidence

    < Back Car Program with From Obsticle Avoidence This is the basic program for a car with an infrared obsticle detection sensor mounted at the front. The sensor is the Infrared Proximity Obstacle Avoidance Sensor 2cm to 30cm which sends an infrared beam out the front and if this hits something it reflects back and is detected. This alerts the program to the fact there is an obstacle in the way of the Robot. in this case the front_hit task is called. When it detects an obsticle at the front it will stop, go back a little, turn and then move forwards again. It will keep on doing this until it gets out of the obsticles way. Program --- Car program with front obsticle avoidence. --- prog_vars = d/count 0 prog_vars. prog_start = -- Clear the screen pclear print "Program Start" -- Reset the buttons rstb -- USER LED off l1 0 -- Set sensor on pin a1 to call front_hit task if we collide. btp a1 front_hit -- Start moving at half speed bms 50 prog_start. prog_loop = inc /count prog_loop. front_hit = --- If the front sensor is triggered we need to stop, go back for a bit and then turn, so we don't hit the same thing again. Fianlly move forward again. --- -- USER on l1 1 -- Go backwards for 2 secs bms -50 dly 2000 -- Turn left turn -50 dly 2000 -- go forwards bms 50 -- USER off l1 0 front_hit. prog_stop = print "Bye" stop prog_stop.

  • Basic Soil Moisture Meter

    < Back Basic Soil Moisture Meter This program uses a capacitive soil moisture probe connected to pin a1 of the JackBord to measure the moisture in some soil and display the reading using the USER LED on the JackBord. The color of the LED will match the soil moisture reading as follows: >= 90% Green >= 75% Cyan >= 50% Navy >= 25% Orange >= 10% Magenta >= 0% Red Program --- Basic Soil Moiture Meter 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. Display them using the JackBords USER LED. That wy you dont need a web browser to use the meter. --- prog_vars = d/count 0 -- Calibration values d/min_value 6 d/max_value 56 -- The final soil moisture reading d/soil_moisture 0 d/moisture_color 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 a fresh reading get_soil_moisture -- Update the USER LED's color display_moist_color /soil_moisture print "/count a1 /a1 Soil moisture /soil_moisture" -- Check if we have done 100 readings inc /count any /count >= 100 -> exitprog -- New reading every second 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. display_moist_color /moisture 0 = -- Use ant command to shoose color to display. -- >= 90% Green -- >= 75% Cyan -- >= 50% Navy -- >= 25% Orange -- >= 10% Magenta -- >= 0% Red -- NO Reading Dim white ant /moisture -> >= 90 -> l1 8 >= 75 -> l1 12 >= 50 -> l1 13 >= 25 -> l1 5 >= 10 -> l1 14 >= 0 -> l1 3 -> l1 1 ant. display_moist_color. prog_stop = print "Bye" prog_stop.

  • Projects - Electronic Dice

    < Back Electronic Dice In this project, you will build on the Rainbow LED project by turning the JackBord into a dice. Using the random function to generate a number and assigning each LED a value (all 5 lit up represents six) makes a very simple electronic dice. Just like the Rainbow LED Display project, we use the same circuit and connect the TOP LEDs to Port A on the JackBord. This time we control the LEDs via a program rather than the command line. This means that we don’t have to manually enter commands every time we want the LEDs to light up, but the program also allows us to give the LEDs a practical function which is, in this case, giving a number between 1 and 6. PDF INSTRUCTIONS Project Gallery

  • Advanced Mine

    < Back Advanced Mine This program assumes that the mines trigger switches are on pins A2 & A3. When one of the switches is triggered we will either add or remove health from the robot. The RGB LEDs are connected to Port C: RED C1 GREEN C2 BLUE C3 The color values for the /color variable are: The port C values say which port C pin will be on for a given color. Color no 0 off 1 Red. C1 2 Green C2 3 Blue C3 4 Cyan C2 C3 5 Purple. C1 C3 6 Yellow C1 C2 Program --- Advanced Mine Program --- prog_vars = d/triggers 0 d/health 10 d/trig_result 0 d/flashes 0 d/start_time 0 d/run_time 0 prog_vars. prog_start = "Mine Start" /start_time /uptime -- Setup the trigger for pin A2 & A3 btp a2 do_boom btp a3 do_boom prog_start. prog_loop = -- Calc run time sub /uptime /start_time -> /run_time -- Check if we are dead >>>>>>>>>>> any /health <= 0 -> -- Dead "XXXXXX WE DIED XXXXX" repeat 10 -> tg c1|d50 exitprog enda. -- Exit any /triggers > 10 -> exitprog any /run_time >= 60 -> "Time up"|exitprog 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 -> /trig_result -- Update the health var add /health /trig_result -> /health -- Check for negative health, if so flash 4 times. any /trig_result < 0 -> /flashes 4 inc /triggers print "Trig /triggers TR /trig_result Health /health flash /flashes" set_color /health /flashes do_boom. set_color /color 0 /led_flash 0 = --- Colors 0 off 1 Red 2 Green 3 Blue 4 Cyan c2 c3 on 5 Magenta c1 c3 6 . Yellow c1 c2 --- -- All c off coff -- Get abs version of color abs /color -> /color repeat /led_flash -> -- Set the color on Port C ant /color -> = 1 -> c1 1 = 2 -> c2 1 = 3 -> c3 1 = 4 -> c3 1|c4 1 = 5 -> c1 1|c3 1 = 6 -> c1 1|c2 1 -> c1 1|c2 1 ant. d250 -- any /led_flash > 2 -> d250 -- any /led_flash < 2 -> d1000 coff repeat. set_color. prog_stop = print "Bye" -- clear the buttons rstb prog_stop.

  • Plot a Cos Wave

    < Back Plot a Cos Wave This program uses the plot command to graph a cos wave. Program --- Plot a cos wave with the plot command. --- prog_vars = d/run_no 0 d/angle 0.0 d/Xpos 0 d/raw_cos 0.0 d/cos_value 0.0 prog_vars. prog_start = pclear ptl 10 0 ^ts=24^tc=blue^ "Plot a Cos wave" prog_start. prog_loop = -- Calc cost of the abgle cos /angle -> /raw_cos -- Scale the Cos wave to fit. mapf -1 1 0 50 /raw_cos -> /cos_value -- Plot the Cos wave. plot 10 50 ^t1n=COS^xdp=100^xp=/Xpos^v1=/cos_value^ inc /angle 0.1 -- 0.1 best inc /Xpos -- Check if we should exit. any /run_no > 100 -> exitprog inc /run_no prog_loop. prog_stop = print "Good bye" prog_stop.

  • Gallery

    Funding Our mission is for JackBord to be the notebook equivalent for STEM subjects in all schools Our early adopter schools have identified the efficiency of the JackBord as being the key item in their teaching toolkit and are setting aside budget to purchase more. We understand some schools may have fully allocated budgets, or simply struggle for sufficient funding to undertake anything other than traditional education, often not enough for many students to achieve curriculum or realise potential; especially those with special needs or where traditional learning fails to trigger their interest. Here are some ideas for schools to consider to fund a system that could make a difference to them and their students. The JackBord Trust Visit Website JackBord Works Limited's main shareholder is a registered charity, the JackBord Trust. ​ The Trust's primary purpose is to find ways to reach and encourage more students to take up coding, engineering and science as careers through educational advancement. ​ The Trust could assist schools and students to find ways to fund its purpose through the purchase and or donation of JackBords from any dividends from its shareholding in the business, or as a vehicle for businesses, parents and other charities to make a tax deductible donation.

  • MK1-S1 Ultrasonic Ruler

    < Back MK1-S1 Ultrasonic Ruler This is the code for the MK1-S1 Ultrasonic Ruler project. It displays the distance to an object in cm on the Show page. Program --- MK1-S1 Ultrasonic Ruler Program For Me-Kit project MK1-S1 Ultrasonic Ruler Displays the distance to an object in cm on the Show page. --- prog_vars = d/count 0 prog_vars. prog_start = pclear -- Show title ptl 10 0 ^ts=35^ "MK1-S1 Ultrasonic Ruler" ptl 40 180 "999 = out of range." -- Quit button pb 10 70 ^n=Quit^p=exitprog^ -- Setup the ultrasonic radar on port C. uradar c1 c2 prog_start. prog_loop = -- main program loop -- Display the distance reading in cm ptl 40 120 ^ts=40^tc=blue^ "Distance /35 cm" -- Wait 100ms d100 prog_loop. prog_stop = ptl 10 0 ^ts=35^ "Bye" prog_stop.

  • PWM Commands

    < 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

  • Junior Robot Wars Mine 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.

  • Octagon Long Argument Test

    < Back Octagon Long Argument Test This is a test program for the task arguments in Octagon. Program --- Hi Octagon --- prog_vars = d/count 1 prog_vars. prog_start = print "My 1st Program" pticks 5 /count 0 rdbg 8 cdbg 5 prog_start. prog_loop = print "Hi from Octagon. /count" inc /count repeat 5 -> print "REP1 count /count" tg a1|tg a5|d1 1 repeat 5 -> print "REP2 count /count"|tg d1|tg a1|tg a5|inc /count -- repeat 5 -> tg d1|tg a1|tg a5 -- repeat 5 -> tg a1 repeat 5 -> tg a1|print "1>Time to quit count /count end" repeat 5 -> print "2>Time to quit count "|tg a5 tg d1 -- Works repeat 5 -> tg a5|inc /count|print "3>Time to quit count /count end" -- Works repeat 5 -> print "4>Time to quit count /count end" tg a5 repeat. -- Arg too long repeat 5 -> tg a5|inc /count|print "3>VERY LONG ARG Time to quit count /count"|tg d2 -- Arg too long at end. repeat 5 -> tg a5|tg d2|inc /count|print "3>VERY LONG ARG Time to quit count /count AT END" -- DOES NOT WORK repeat 5 -> print "5>Time /count end"|tg a1 repeat. -- Does NOT WORK repeat 5 -> print "6>Time to quit count /count end"|tg a5 tg d2 repeat 4 -> print "this is repeat 4" tg a1 repeat. -- any /count >= 15 -> print "Time to quit count /count end"|exitprog any /count >= 15 -> print "7>Time to quit count /count end"|tg a5|exitprog prog_loop. prog_stop = print "Prog STOPPED!" prog_stop.

  • Projects - Driving Robot

    < Back Driving Robot In this project, you will create a robot that can drive around using the DRIVE page on the dashboard, the command line, or a program. Once you have your wheels attached, there are three ways in which you can drive the JackBord. This project walks you through controlling the motors by using the joystick on the DRIVE page, the command line on the CMD page, and a program on the PROG page. By the end of this project, you’ll be comfortably controlling your robot, and have a good understanding of its controls. PDF INSTRUCTIONS Project Gallery

  • Korahs Random Lights

    < Back Korahs Random Lights This program will randomly flash 5 LEDs attached to Port C using a random number to decide which LEDs are lit. Program --- Korahs Random Lights Program This program will randomly flash 5 leds attached to port C using a random number to decide which LEDs are lit. --- prog_vars = -- Holds the random number d/random 0 d/count 0 prog_vars. prog_start = print "Korahs Random Lights Program" /random 0 prog_start. prog_loop = -- main program loop -- Increase the /count by 1 inc /count -- Get a new random number between 0 and 6. rand 0 6 -> /random print "Count /count rand no /random" -- Use the ant the determine which LED we should light -- up based upon the random number. -- A 6 will turn them all off. ant /random -> = 1 -> c1 1 = 2 -> c2 1 = 3 -> c3 1 = 4 -> c4 1 = 5 -> c5 1 -> coff ant. -- Check if we shoukd exit. any /count > 1000 -> exitprog prog_loop. prog_stop = print "Bye" prog_stop.

  • Ski Ramp

    < Back Ski Ramp Measure how long it takes a ball to role down a ramp. Setup the ramp so that the first gate goes to B1 and the second to B2. Program --- Ski Ramp Program Measure how long it takes a ball to role down a ramp. Setup the ramp so that the first gate goes to B1 and the second to B2 --- prog_vars = d/count 0 d/start_time 0.0 d/stop_time 0.0 d/interval 0.0 d/results[10] 0.0 d/run_no 0 prog_vars. prog_start = pclear print "Ski Program Start" -- Setup the gates get b1 get b2 btp a1 calc_time btp a2 display_results prog_start. prog_loop = -- main program loop inc /count any /count >= 10000 -> exitprog prog_loop. calc_time = inc /run_no sub /s_atb2 /s_atb1 -> /interval print "Ball run /run_no interval /interval" -- Store the result /results[/run_no] /interval calc_time. display_results = print "Ski Results" /run_no 1 repeat 10 -> print "run /run_no time /results[/run_no]" inc /run_no repeat. display_results. prog_stop = print "Bye" prog_stop.

bottom of page