top of page

Search Results

285 results found with an empty search

  • Sheep Dog Program

    < Back Sheep Dog Program This program works out how many sheep dogs are required to look after a given number of black and white sheep. Program --- Sheep Dog Program --- prog_vars = d/white_sheep 0 d/black_sheep 0 d/total_sheep 0 d/runs_to_do 10 d/runs_done 1 d/colors[] "" prog_vars. prog_start = print "Sheep Program." print "No of runs to do /runs_to_do" -- Setup the colors /colors[1] "Black" /colors[2] "White" prog_start. prog_loop = -- Get more sheep, and see what color they are. get_sheep -> /qty_of_sheep /color "/runs_done > New Sheep qty /qty_of_sheep color /colors[/color]" -- Check the type of sheep, update respective count any /color = 1 -> -- update black sheep add /black_sheep /qty_of_sheep -> /black_sheep else -- update white sheep add /white_sheep /qty_of_sheep -> /white_sheep enda. -- Update the total no of sheep add /white_sheep /black_sheep -> /total_sheep -- Check how many sheep dogs we need for the sheep check_dogs /total_sheep -> /dogs_needed -- Check if its time to exit yet any /runs_done >= /runs_to_do -> exitprog enda. -- Next run inc /runs_done prog_loop. get_sheep -> /qty_of_sheep 0 /color 1 = --- Returns a random quantity of sheep, of a random color. --- rand 0 100 -> /qty_of_sheep -- Get the color of this batch of sheep. -- 1 = black 2 = white rand 1 2 -> /color get_sheep. check_dogs /no_of_sheep 0 -> /dogs_needed 0 = --- Calc the number of sheep dogs we need to manage this many sheep. Return the no of dogs we need. --- mul 0.1 /no_of_sheep -> /dogs_needed check_dogs. prog_stop = -- display the final results print "We need /dogs_needed dogs to manage them" print "Total sheep /total_sheep" print "Black /black_sheep White /white_sheep" print "Exit Prog" 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

  • Vector Graphics Test

    < Back Vector Graphics Test ​ Program --- Vector Graphics Test Program. --- prog_vars = d/count 0 d/xpos 0 d/ypos 0 d/text_to_show "Jack is a very good boy" prog_vars. prog_start = print "Program Start" gvr b1 0 100 pclear ptl 100 200 "Some Text 100 200 /text_to_show" ptl 0 0 "Letter Position 0 0 /text_to_show" ptl a a "Letter Position a a /text_to_show" ptl z z "ZZ Letter Position z z /text_to_show" ptl m i "Letter Position m i /text_to_show" -- Rectangle pr 80 123 100 100 ^id=r1^width=2^fill=red^color=blue^round=2^ pr 180 223 100 50 ^id=r1^width=5^fill=lime^color=brown^round=2^ -- exitnow -- Button pb j j ^name=d1 2^press=d1 1|d2 1^rel=doff^ pb o j ^name=c1 2^press=c1 1|c2 1^rel=coff^ pb l l ^name=Clear^press=pclear^ -- Circle pcr 140 300 20 ^id=c8^width=2^fill=red^color=blue^ -- Vertical Line pvl b 100 60 ^width=20^color=blue^lcap=rect^ pvl e 100 60 ^width=20^color=blue^lcap=round^ pvl i 100 60 ^width=20^color=blue^lcap=square^ -- Horizonbtal Line phl i j 60 ^width=20^color=blue^lcap=rect^ phl i k 60 ^width=20^color=blue^lcap=round^ -- Button pb j j ^name=d1 2^press=d1 1|d2 1^rel=doff^ -- ptl with Tags ptl 100 100 ^size=24^font=Arial^ "Some Text 100 100" prog_start. prog_loop = -- main program loop print "Count /count" -- Display B1 pvl j 100 /b1 ^id=b1^width=20^color=yellow^lcap=rect^ ptl j 120 ^id=tb1^ "b1 /b1" any /count < 20 -> inc /count ptl /xpos /ypos "Count /count" -- Circle pcr 140 300 /ypos ^id=c8^width=2^fill=red^color=blue^ inc /xpos 25 inc /ypos 25 enda. any /count >= 200 -> exitprog prog_loop. prog_stop = print "Bye" prog_stop.

  • Personal Weather Station

    < Back Personal Weather Station This is a basic weather station that measures air temperature and relative humidity. Program --- Personal Weather Station --- prog_vars = d/count 0 d/air_temp 0.0 d/rh 0 prog_vars. prog_start = pclear print "Weather Station Program Start" i2con d1000 f2c pb 100 50 ^n=Quit^p=exitprog^ ptl 20 0 ^ts=24^ "My Weather Station" prog_start. prog_loop = -- main program loop /air_temp /35 /rh /36 ptl 100 100 ^ts=24^tc=red^ "Air Temp /air_temp" ptl 100 150 ^ts=24^tc=blue^ "RH /rh" prog_loop. prog_stop = print "Bye" prog_stop.

  • Projects - Soccer Robot

    < Back Soccer Robot In this project, you will use your JackBord to play soccer! We do this by turning an ice cream container into a scoop or a foot so the JackBord can push a ball from one point to another. This project also includes different ways you can play and different challenges you can implement in order to make driving and scoring more difficult for your robot. One of these challenges includes programming the buttons on the DRIVE page on the dashboard, and then using these buttons to control your soccer robot. PDF INSTRUCTIONS Project Gallery

bottom of page