top of page

Search Results

285 results found with an empty search

  • Raspberry Shake Raw Data Plotting and Alerting

    < Back Raspberry Shake Raw Data Plotting and Alerting Program --- Raspberry Shake Raw Data Plotting and Alerting Program This program uses the grsk command to get a fresh set of readings from the Raspberry Shake and plots them. --- prog_vars = d/count 0 d/xpos 0 d/x_axis_ypos 300 -- Processed Sensor Values. -- These ahve the offsets applied. d/pro_EHZ 0 d/pro_ENE 0 d/pro_ENN 0 d/pro_ENZ 0 prog_vars. prog_start = pclear d500 ptl 10 5 ^ts=24^tc=blue^ "Raspberry Shake Raw Data Program" -- Add Quit Button pb 25 50 ^n=Quit^p=exitprog^ prog_start. prog_loop = -- main program loop inc /count -- Stop agftwer 1000 readings any /count >= 100000 -> exitprog -- Get a fresh set of readings from the shake grsk AM.R5C47 -- Apply Offsets to get Processed Values sub /rs_EHZ 16000 -> /pro_EHZ sub /rs_ENE -207461 -> /pro_ENE sub /rs_ENN -287500 -> /pro_ENN sub /rs_ENZ 3594472 -> /pro_ENZ -- Plot EHZ, ENE, ENN plot 0 75 ^id=rs^t1n=Z^t2n=E^t3n=N^xp=/xpos ^v1= /rs_EHZ ^v2= /rs_ENE ^v3= /rs_ENN ^ -- Display the plot value ptl 30 45 ^ts=16^ "X /xpos > EHZ /pro_EHZ > ENE /pro_ENE > ENN /pro_ENN > ENZ /pro_ENZ " any /pro_EHZ >= 50000 /pro_EHZ <= -50000 -> ptl 25 1 ^ts=25^tc=blue^ "Tapapa Hopukina Kia mau" else ptl 25 1 ^ts=25^tc=Lime^ "OK" enda. -- Next Xpos inc /xpos -- Wait a while for next readings d500 prog_loop. prog_stop = ptl 525 5 ^ts=100^ "Bye" prog_stop.

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

  • Testimonials

    Testimonials Screenshot 2023-08-31 at 11.54.06 AM Screenshot 2023-08-31 at 11.54.06 AM 1/9

  • OneWire Bus Commands

    Command Guide < Back OneWire Bus Commands f1w - Find attached OneWire devices Purpose This will scan the OneWire bus looking for attached devices. When a new device is found it will be setup and added as a new channel. Syntax f1w Examples > f1w < Finding OneWire Devices.... < Found DS18B20 dev 1 type 40 [0x28]h Chan [26] Address [01:3C:CF] < Found DS18B20 dev 2 type 40 [0x28]h Chan [27] Address [FF:3C:A4] < Found 2 devices Channels & Vars Each of the devices found will be allocated the channels the require automatically. Their readings will appear in the gt command etc. l1w - List devices on the OneWire bus Purpose This command will list all of the devices on the OneWire bus. Syntax l1w Examples > l1w < Chan Name Addr Hex Mode Type Units Raw Value Errors < 26 Temp 01:3C:CF 1 DS1820_Temp C 21 21.81 0 < 27 Temp FF:3C:A4 1 DS1820_Temp C 22 22.19 0 rst1w - Reset the devices on the OneWire bus Purpose This command will reset all of the channels of devices on the OneWire bus. Syntax rst1w Examples rst1w OneWire Chans Reset s1woff - Disable the OneWire bus on port C pin 5 Purpose Turn off the OneWire us on port C5 and return it to it's default state. Syntax s1woff Examples s1woff s1won - Enable the OneWire bus on port C pin 5. Purpose Setup pin C5 as the OneWire bus so you can connect 1wire devices to it. Syntax s1won Examples s1won

  • TOP Smart RGB LED Demo 1

    This program displays the standard colors on the TOPs smart RGB LED starting at 0 and ending at 15. This demo is part of the video "Using the TOPs Smart EGB LED". < Back TOP Smart RGB LED Demo 1 This program displays the standard colors on the TOPs smart RGB LED starting at 0 and ending at 15. This demo is part of the video "Using the TOPs Smart EGB LED". Program --- TOP Smart RGB LED Demo 1 This program displays the standard colors on the TOPs smart RGB LED starting at 0 and ending at 15. This demo is part of the video "Using the TOPs Smart EGB LED". --- prog_vars = d/led_color 0 prog_vars. prog_start = pclear sledn 1 print "Smart RGB Demo 1: Start" prog_start. prog_loop = -- main program loop -- display the color sled 1 /led_color -- Wait a quarter of a second. d250 -- Increment /led_color to the next color inc /led_color -- Check if we are done any /led_color > 15 -> exitprog prog_loop. prog_stop = print "Bye" prog_stop.

  • Smart LED Commands

    Command Guide < Back Smart LED Commands sled Smart LED Control sled Control WS2812B smart LEDs Purpose Control the color and brightness of one or more WS2812B Smart LEDs attached to port C5 on their JackBord. Note: you need to run the sledn command first to tell the JackBord how many LEDs are connected to the strip. So if we had 10 LEDs the command would be sledn 10 and so on. In this example the first led in the strip is number 1, the last is no 10. Syntax This command has two versions: Syntax 1: In this version you use a single number between 0 and 15 to set the color of the specified LED, using the colors in the table below. sled N C U Arguments N The number of the LED to be controlled. C The color to set the LED to, from the list of colors below: U Update the LEDs: Missing means update the LEDs now. 0 = Don't update them, instead use the usled command later to update them all in one go. Examples sled 5 3 The 3 is the color red. If you ran the command with a 0 at the end the LEDs wont change until you run the usled command which updates them all. eg sled 5 3 0 Syntax 2: Use RGB values to set the LEDs color. sled N R G B U Arguments N The number of the LED to be controlled. R The red value, 0 to 255 G The green value, 0 to 255 B The blue value, 0 to 255 Pushers No U Update the LEDs: Missing means update the LEDs now. 0 = Don't update them, instead use the usled command later to update them all in one go. Examples sled 3 255 255 255 Set LED 3 to white and do it right now sled 3 255 255 255 0 Set LED 3 to white but don't update the LED, LED will only change color when the usled command is run. Notes Works with a WS2812B smart led strip. Use the usled command to update the LEDs all in one go. sledb Set Smart LED Brightness sledb Set the brightness of the smart LEDs. Purpose Set the brightness of the WS2812B Smart LEDs attached to port C5 on ther JackBord. Note: you need to run the sledn command first to tell the JackBord how many LEDs are connected to the strip. So if we had 10 LEDs the command would be sledn 10 and so on. Syntax sledb B Arguments B The desired brightness from 0 to 100. 0 = Off 100 = Maximum brightness. Examples sledb 0 Turn the smart LEDs off sledb 50 Set the brightness to half Notes Works with a WS2812B smart led strip. sledn Set Number of Smart LEDs sledn Set the number of Smart LEDs connected to the JackBord. Purpose Tells the JackBord how many WS2812B smart LEDs it is controlling with the sled command. NOTE: You need to run this command BEFORE using the sled command. Syntax sledn total Arguments total The total number of WS2812B smart LEDs connected to the JackBord.1 to 50. Examples sledn 10 Notes Works with a WS2812B smart led strip. sledoff Turn All of the Smart LEDs Off sledoff Turn all of the smart LEDS off Purpose Turn all of the WS2812B Smart LEDs off on a given pin. Syntax sledoff #~ Arguments # The port letter a, b, c, d ~ The port pin number 1 to 5 Notes Works with a WS2812B smart led strip.

  • Button Commands

    Command Guide < Back Button Commands bp - Simulate a button press Purpose Simulates a button press on a given pin. This is used for the GCC version of Octagon or where a physical button is not available. Syntax bp #~ Arguments #~ The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4 Examples bp a1 bp c4 Notes This can be used from the command line and in programs. Channels & Vars Updates the corresponding channel. br - Simulate a button release Purpose Simulates a button release on a given pin. This is used for the GCC version of Octagon or where a physical button is not available. Syntax br #~ Arguments #~ The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4 Examples br a1 br c4 Notes This can be used from the command line and in programs. Channels & Vars Updates the corresponding channel. btd - Set the button debounce delay in milli seconds Purpose Sets the debounce delay for buttons. Syntax btd delay Arguments delay The debounce delay in milli seconds. 50 to 250. Examples btd 50 Notes Use with pins set as buttons. btg - Get the state of a button Purpose Gets the state of the specified button Syntax btg #~ Arguments #~ The port letter a, b, c, d and pin number 1 to 5. eg a1 or c4 Examples > btg a1 < Btg button chan[1] pin [a1] State [1] 1 = pressed btp - Set a button press event Purpose Set a command/s that should be run when the specified button is pressed. Syntax btp #~ command/s Arguments #~ The port letter a, b, c, d and port pin number 1 to 5 command/s One or more commands that should be run when the button is pressed. Commands may be daisy chained. Examples btp a1 “Hi from button 1” btp a2 d1 1|d500|d1 0 Notes This can be used from the command line and in programs. Drive Page Buttons: The drive page buttons 1 to 9 are virtual buttons and are on port v ie v1 to v9. eg btp v1 “Hi from drive button 1” btr - Set a button release event Purpose Set a command/s that should be run when the specified button is released. Syntax btr #~ command/s Arguments #~ The port letter a, b, c, d and port pin number 1 to 5 command/s One or more commands that should be run when the button is released. Commands may be daisy chained. Examples btr a1 “Bye from button 1” btr a2 d1 1|d500|d1 0 Notes This can be used from the command line and in programs. Drive Page Buttons: The drive page buttons 1 to 9 are virtual buttons and are on port v ie v1 to v9. eg btr v1 “Bye from drive button 1” lb - List buttons Purpose Display a list of the currently active buttons. Syntax lb lbc - List button commands Purpose Display a list of the commands required to reproduce the currently set buttons. Use this to backup button settings. Examples > lbc < Button Commands btp a1 "Button press a1" btr a1 "Button release a1" rstb - Reset all buttons Purpose reset all of the set buttons.

  • WiFi Signal Strength using ant

    This program uses the /wifisig system variable to display how good the Wifi signal the JackBord has is. It uses the ant statement to determine which message to display based upon the strength of the Wifi signal. < Back WiFi Signal Strength using ant This program uses the /wifisig system variable to display how good the Wifi signal the JackBord has is. It uses the ant statement to determine which message to display based upon the strength of the Wifi signal. Program --- Wifi Signal Strength Program using ant. This uses the /wifisig system variable and the ant command to check the wifi strength, and then 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 10 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 ant /current_wifi -> <= -85 -> /wifi_state "Not Good" <= -80 -> /wifi_state "TOO LOW!" <= -70 -> /wifi_state "LOW" <= -60 -> /wifi_state "WORSE" <= -50 -> /wifi_state "BETTER" <= -40 -> /wifi_state "GOOD" <= -30 -> /wifi_state "V GOOD" -> /wifi_state "NO Signal" ant. print "Wifi /wifi_state /current_wifi" any /runs_done = /runs_to_do -> exitprog inc /runs_done d1 0 prog_loop. prog_stop = print "Good bye" prog_stop.

  • General Commands

    Command Guide < Back General Commands hi Command hi Display a simple hello message bye Command bye Log off the JackBord. For multi user systems only. vs View Status Command vs Display the status of the JackBord Purpose Displays status information for the JackBord including the up time and the running program, etc. Syntax vs inc Increment a Value inc Increment a value Purpose This command will increment the value of the specified port or variable by one. Or, if an offset is provided by that offset. Syntax inc target offset Arguments target This is the desired port pin ie a1, c4, etc. A channel number or variable. offset The amount by which the value of the target is to be incremented. If this is omitted, a value of 1 will be used by default. Pushers Yes Examples inc a1 Increment the value of port A1 by 1 inc a1 5 Increment the value of port A1 by 5 inc /count Increment the value of the /count variable by 1 inc /count 100 Increment the value of the /count variable by 100 inc /beans ->bean_count dec Decrement a Value dec Decrement a value Purpose This command will decrement the value of the specified port or variable by 1. Or if an offset is provided by that offset. Syntax dec target offset Arguments target This is the desired port pin ie a1, c4 etc. A channel number or a variable. offset The amount by which the value of the target is to be decremented. If this is omitted a value of 1 will be used by default. Pushers Yes Examples dec a1 Decrement the value of port a1 by 1. dec a1 5 Decrement the value of port a1 by 5. dec /count Decrement the value of the /count variable by 1 dec /count 100 Decrement the value of the /count variable by 100 dec /beans -> /bean_count

  • Date and Time Commands

    Command Guide < Back Date and Time Commands dly - Delay for a set period of milli seconds Purpose: Delays the execution of a program by the specified number of milli-seconds. Syntax dly delayms Pushers No Returns Nothing Examples dly 100 wait 100ms dly 1000 wait 1sec Notes This command does not delay the command line or other functions when run in a program. Standard Delays The following is a table of standard delays built into JackBord: Examples d50 wait 50ms d500 wait 0.5secs rtimer1, rtimer2, rtimer3 - Reset system timer no 1 2 or 3 Purpose Reset system timer no 1 back to 0. This timer counts in milli-seconds from the time it was last reset and is available via the /timer1 system variable. Syntax rtimer1 Notes The format is the same for the other 3 system timers. e.g. rtimer2 and rtimer3

  • Sync Command Test

    This is a program to test the new sync command. < Back Sync Command Test This is a program to test the new sync command. Program --- Sync Command Test Program This is a program to test the new sync command. --- prog_vars = d/var1 1 d/var2 2 d/volts 0 d/volt2 0 d/speed 0 d/light 0 d/run_no 0 d/turn_servo 0 d/sine 0.0 prog_vars. prog_start = print "Sync Test Prog" -- Sync var 2 to var 1's value. sync /var1 /var2 -- get port B1 gvr b1 -50 180 -- Setup a Sync Daisy Chain -- Sync b1 to /volts var sync b1 /volts -- get port B2 . Steering gvr b2 -100 100 sync b2 /light sync b2 153 free.5 mapi -100 100 0 180 /light -> /turn_servo sync turn_servo c1 free.1 -- Motor speed control sync /volts 150 sync 150 /speed svp c1 /speed sync b1 c1 sync /speed 150 free.5 pwm d1 50 sync b1 d1 pwm a1 50 sync /light a1 pwm a2 50 sync /light a2 sync /light d1 free.5 pwm a3 50 sync /b1 a3 pwm a4 50 sync /b1 a4 src free.1 svp c1 50 "******* RUN PROG **********" prog_start. prog_loop = -- Update var 1 /var1 /run_no sin /run_no -> /sine mapf -1 1 0 100 /sine -> /sine -- "var1 /var1 syncs to var2 /var2" -- "b1 /b1 volts /volts 150 /150" -- "light /light turn /turn_servo" tbar * /sine 50 10 "s /sine" -- svp c1 /speed -- poowm d1 /speed inc /run_no any /run_no > 1000 -> exitprog prog_loop. prog_stop = print "bye" prog_stop.

  • USER LED Commands

    Command Guide < Back USER LED Commands suled Control a User LED suled Control a USER LED Purpose Control the color and brightness of one of the USER LEDs on the JackBord Syntax This command has two versions: Syntax 1: In this version you use a single number between 0 and 15 to set the color of the specified USER LED, using the colors in the table below. suled L C U Arguments L The number of the USER LED to be controlled. LED no USER LED 1 Front (block 2 & 3) 2 Internal USER LED 2 (block 3) 3 Internal USER LED 3 (block 3) C The color to set the LED to, from the list of colors below: Examples suled 1 3 This sets USER LED to the colour red. Syntax 2: Use RGB values to set the LEDs color sled L R G B Arguments L The number of the USER LED to be controlled. LED no USER LED 1 Front (block 2 & 3) 2 Internal USER LED 2 (block 3) 3 Internal USER LED 3 (block 3) R The red value, 0 to 255 G The green value, 0 to 255 B The blue value, 0 to 255 Examples suled 3 255 255 255 Set USER LED 3 to white suled 1 128 0 0 Set the front USER LED to red Notes This command is for the USER LEDs. The USER LEDs can also be controlled on port l. Where l1 is the front USER LED, so l1 1 turns the front USER LED on. l1 15 sets the front USER LED to be purple and so on.

  • Shop

    Shop Quick View JackBord Pro Price $269.00 GST Included | Shipping is additional New Arrival Quick View JackBord Basic Price $70.00 GST Included | Shipping is additional Quick View JackBord Pro TOP Price $92.00 GST Included | Shipping is additional Quick View JackBord Basic TOP Price $25.00 GST Included | Shipping is additional Quick View JackBord Starter Kit Price $494.50 GST Included | Shipping is additional Quick View JackBord Electronics Kit Price $359.00 GST Included | Shipping is additional Quick View JackBord Robot Kit Price $290.00 GST Included | Shipping is additional Quick View JackBord Science Kit Price $300.00 GST Included | Shipping is additional Quick View JackBord RC Servo Kit Price $285.00 GST Included | Shipping is additional Quick View Motor Drive Kit Price $34.00 GST Included | Shipping is additional Quick View Science Kit 1 Price $80.00 GST Included | Shipping is additional Quick View Laser Range Finder USI Price $19.50 GST Included | Shipping is additional Quick View Light Stick Price $12.95 GST Included | Shipping is additional Quick View Dual RC Servo Adaptor USI Price $9.50 GST Included | Shipping is additional Quick View RC Servo Price $9.90 GST Included | Shipping is additional Quick View Short Range Proximity USI Price $19.50 GST Included | Shipping is additional Quick View Soil Moisture USI Price $19.50 GST Included | Shipping is additional Quick View Temperature Probe USI Price $19.50 GST Included | Shipping is additional Quick View Turbidity Sensor USI Price $19.50 GST Included | Shipping is additional Quick View Temperature & Relative Humidity USI Price $19.50 GST Included | Shipping is additional Quick View Ultra Sonic Range Finder Price $19.50 GST Included | Shipping is additional Quick View Robot Drive Motor Price $5.75 GST Included | Shipping is additional Quick View Trolley Wheel Price $4.30 GST Included | Shipping is additional Quick View Rear Wheel Price $5.00 GST Included | Shipping is additional Load More

  • Programs

    Programs These are some example programs to get you going! Add Numbers View Age Calculator View All Statement Test Example View Any Statement Example View Any and All Statement Text Test View Basic 90-Degree Turn View Advanced Mine View Age Calculator Extended View Ant Command Test View Any and All Numbers Test View Auto Booting/Running a Program View Basic Capacitive Soil Moisture Sensor View 1 2 3 4 5 1 ... 1 2 3 4 5 6 7 8 ... 8

  • Sensors

    Sensors BME280 Temperature, Relative Humidity and Pressure This sensor allows you to measure air temperature, relative humidity and atmospheric pressure. Learn more Colour Sensor Module The TCS34725 colour module allows the JackBord to determine the colour of a surface or object placed near the sensor. Learn more Infrared Obstacle Avoidance This unit will detect the presence of objects at distances of between about 2cm to 30cm. Learn more RGB Colour Detects the RGB (red, green and blue) colours of an object. Learn more Sound Detection Use the simple sound detector module to determine if there is sound above a pre-set threshold. Learn more Capacitive Soil Moisture This analog capacitive soil moisture sensor measures soil moisture by detecting the change in capacitance that stems from the moisture content of the surrounding soil. The output of the sensor is a voltage between 0V and 3V, with 0V being very dry soil and 3V being wet soil. Learn more HC-SR505 Mini PIR Infrared Motion HC-SR505 is an infrared module which detects the movement of a person or animal, at distances of up to 3m. Learn more MQ4 Methane Gas The MQ4 module allows the JackBord to detect methane gas at concentrations from 300 ppm to 10,000 ppm. The reading output from the sensor is an analog voltage from 0.1V to 4.5V. There is a digital output as well, pin DO, which is normally high and goes low when gas is detected. Learn more Short Range Proximity This sensor uses an infrared transmitter and receiver to gauge the distance between the sensor and an object near it. It has a digital and an analog output which can be used to control things in response to the presence or absence of an object. Learn more

  • Projects

    Projects Automatic Night Light In this project, you will make use of the LDR sensor on the TOP to create a light-sensitive night light with one of the LEDs. Read More 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. Read More 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. Read More Rainbow LED Display In this project, you will utilise all five LEDs on the TOP to create a rainbow. With proper commands, you can even make it pulse in sequence. Read More 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. Read More WiFi Signal Dial In this project, we are going to turn the JackBord into a dial so we can visually see the strength of the WiFi signal it is currently receiving. We will use an RC servo, which will move its arm in response to the WiFi strength. Read More

  • Programs

    Programs These are some example programs to get you going! Add Numbers View Age Calculator View All Statement Test Example View Any Statement Example View Any and All Statement Text Test View Basic 90-Degree Turn View Advanced Mine View Age Calculator Extended View Ant Command Test View Any and All Numbers Test View Auto Booting/Running a Program View Basic Capacitive Soil Moisture Sensor View 1 2 3 4 5 1 ... 1 2 3 4 5 6 7 8 ... 8

  • Projects

    Projects Automatic Night Light In this project, you will make use of the LDR sensor on the TOP to create a light-sensitive night light with one of the LEDs. Read More 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. Read More 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. Read More Rainbow LED Display In this project, you will utilise all five LEDs on the TOP to create a rainbow. With proper commands, you can even make it pulse in sequence. Read More 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. Read More WiFi Signal Dial In this project, we are going to turn the JackBord into a dial so we can visually see the strength of the WiFi signal it is currently receiving. We will use an RC servo, which will move its arm in response to the WiFi strength. Read More

  • Basic Mine

    < Back Basic Mine This is the basic mine program. The switch for the mine is a circular wire mounted on the outside of the JackBord. This wire represents one half of the switch the other half of the switch is the case of the JackBord itself. Thus to close the switch, or press the button, the wire comes into contact with the case of the JackBord this is what triggers the mine. When triggered the mine program will display a message and it will also tell you the number of times that it has been triggered. Once triggered 10 or 11 times the program will exit. Program --- Basic Mine Program The switch for the mine is connected to the JackBords port A pins 5 and ground. When triggered the mine will tell you. --- prog_vars = d/count 0 d/boom 0 d/triggers 0 prog_vars. prog_start = print "Mine Start" -- Setup the trigger for pin A5 btp a5 d1 1|/boom 1|"BOOM!" -- Turn D1 off d1 0 prog_start. prog_loop = -- main program loop -- Check if mine triggered. any /boom = 1 -> -- YES triggered inc /triggers print "Count /count TRIG no /triggers BOOM /boom" -- Reset /boom 0 --clear d1 d1 0 enda. -- Exit after 10 triggers. any /triggers > 10 -> exitprog inc /count prog_loop. prog_stop = print "Bye" -- clear the buttons rstb prog_stop.

  • Any and All Statement Text Test

    < Back Any and All Statement Text Test This program tests the any and all statements with text values. The test values are all text. Program --- all Statement Test Program no 1 This is an example program showing how to use all statements. --- 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 "a" = "a" all "a" = "a" -> print "Test 1 TRUE CORRECT" else print "Test 1 FALSE WRONG" exitprog enda. -- Test 2 Should be FALSE ie "a" != "b" all "a" = "b" -> 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 4 FALSE WRONG" exitprog enda. -- Test Should be TRUE ie "Jack" is = "JacK" all "Jack" = "Jack" -> print "Test 5 TRUE CORRECT" else print "Test 5 FALSE WRONG" exitprog enda. prog_loop. prog_stop = print "Bye" prog_stop.

bottom of page