Search Results
285 results found with an empty search
- Basic Forms
Displays some form prompts that update as you enter new values. < Back Basic Forms Displays some form prompts that update as you enter new values. Program --- Form Program --- prog_vars = d/count 0 d/xpos 0 d/ypos 0 d/text_to_show "Jack is a very good boy" d/name "jack" d/height 1.84 d/age 0 prog_vars. prog_start = pclear ptl 100 1 ^ts=24^ "Program Start" etl h d ^pmt=Edit text^w=20^max=20^c=lime^var=name^ "Name /name" etl h f ^pmt=age^w=20^max=20^c=lime^var=age^ "/age" etl h h ^pmt=Height^w=20^max=20^c=lime^var=height^ "/height" etl h j ^pmt=Speed^max=20^var=150^ "/150" ptl h p ^id=h1^ts=16^ "Name: /name Age /age height: /height" pb 10 100 ^n=update^p=update_values^ pb 10 150 ^n=Quit^p=exitprog^ prog_start. prog_loop = -- main program loop ptl h p ^id=h1^ts=16^ "Name: /name Age /age height: /height" prog_loop. update_values = ptl h p ^id=h1^ts=16^ "Name: /name Age /age height: /height" update_values. prog_stop = print "Bye" pclear ptl m h ^ts=40^tc=red^ "Bye" prog_stop.
- Quake Indicator
This has 3 RC Servos connected to ports A1 to A3. < Back Quake Indicator This has 3 RC Servos connected to ports A1 to A3. Program --- Quake Indicator Program This has 3 rc servos connected to ports A1 to A3. --- prog_vars = d/count 0 prog_vars. prog_start = pclear print "Program Start count /count" prog_start. prog_loop = -- main program loop print "Count /count" inc /count any /count >= 50 -> exitprog small_quake medium_quake big_quake exitnow prog_loop. small_quake = "small" -- Sweep Servo on A1 svs a1 90 5 small_quake. medium_quake = "Medium" -- Sweep Servo on A2 svs a2 90 5 medium_quake. big_quake = "Big" -- Sweep Servo on A3 svs a3 90 5 big_quake. prog_stop = print "Bye" prog_stop.
- L298 H-Bridge Commands
Command Guide < Back L298 H-Bridge Commands clr298 - Clear L298 Bridge Settings to Defaults Purpose This will disable the l298 bridges and return the Port C & D pins to their defaults. Syntax clr298 con298 - Control an L298 H-Bridge Purpose Allows the specified L298 H-bridge to be controlled. The direction and speed of each half of the bridge may be set. Note: The L298 H-Bridge must be connected to the JackBord as follows: L298 JackBord L298 ENA1 (PWM signal) C1 L298 IN1 C2 L298 IN2 C3 L298 ENA2 (PWM signal) C4 L298 IN3 C5 L298 IN4 D1 Syntax con298 bridge motor speed Arguments bridge The number of the bridge to control. 1 or 2. motor The number of the motor on the bridge to control. 1 or 2. speed The speed to be applied to the specified motor. The speed is between -100 and 100. 100 = Full forwards speed 0 = Stop -100 = Full reverse speed Examples con298 1 1 100 Full forward speed on motor 1 on bridge 1. l298 - List the L298 bridge settings Purpose Shows the settings of the L298 bridges. Syntax l298 p298 - Pulse L298 H-Bridge Purpose Pulse the specified l298 h-bridge no for the no of pulses with each separated by a delay in msecs. Note: The L298 H-Bridge must be connected to the JackBord as follows: L298 JackBord L298 ENA1 (PWM signal) C1 L298 IN1 C2 L298 IN2 C3 L298 ENA2 (PWM signal) C4 L298 IN3 C5 L298 IN4 D1 Syntax p298 B M P L D Arguments B The number of the bridge to control. 1 or 2. M The number of the motor on the bridge to control. 1 or 2. P The number of pulses to send. L The length in milli-seconds of each pulse. D The delay in milli-seconds between each pulse. Examples p298 1 1 5 75 100 Pulse motor 1 on bridge 1 with 5 pulses each 75ms wide and with a 100ms delay between pulses. rst298 - Reset L298 Bridge Settings to Defaults Purpose Reset the l298 bridges and disable them. Syntax rst298 sap - Set Linear Actuator Position Purpose This command will set the specified linear actuator shaft to the specified position. Syntax sap B M pos Arguments B The number of the bridge to control. 1 or 2. M The number of the motor on the bridge to control. 1 or 2. pos The position of the END of the shaft from its fully closed position. Examples p298 1 1 5 75 100 Pulse motor 1 on bridge 1 with 5 pulses each 75ms wide and with a 100ms delay between pulses. Notes The width in pulses of the actuators full draw must be established beforehand to avoid damage. The actuator should be of the type that automatically stops at each end of its extension. apid - Set the Wifi access point SSID to use in World mode Purpose Sets the Wifi access point SSID that the JackBord will try to connect to when it boots into World mode. Syntax apid SSID Arguments SSID The Wifi access point SSID. From 1 to 30 characters. Examples apid Tree Set the SSID to Tree apid Big Fat Cat Set the SSID to Big Fat Cat appw - Set the Wifi access point password to use in World mode Purpose Sets the Wifi access point’s password of the access point the JackBord will try to connect to in World mode. Syntax appw password Arguments password The Wifi access point password. From 8 to 20 characters minimum. Examples appw fish eat frogs Set the access point password to fish eat frogs fuserap - Force the use of the user set Wifi access point. Purpose If its set to 1 this means we want to force the JackBord to use the SSID set in the var even though the JBHub access point may also be available. Syntax fuserap value Arguments value 0 = Don’t force the use of the users ap. 1 = Yes do force the use of the users ap Examples fuserap 0 fuserap 1 hget - Do an http request to the specified URL Purpose This will do an http GET request to the specified URL and store the results in the output variable, which must be of a text type. Syntax hget “URL” -> result Arguments “URL” The http URL, in “” quotes to which the GET request is to be made. result This is a text variable that holds the result of the get request. Examples hget “www.google.com” -> /result
- Simple WiFi Signal Version 2
This is a slightly more advanced version of the Simple Wifi Signal Program, that displays a comment next to the Wifi signal reading. The comments are based upon this table: Strength Meaning -30 Amazing -67 Very Good -70 OK -80 Not Good -90 Unusable It gets the Wifi signal strength from the /s_wifisig system variable and uses the ant statement to apply the correct comment based on the signal. < Back Simple WiFi Signal Version 2 This is a slightly more advanced version of the Simple Wifi Signal Program, that displays a comment next to the Wifi signal reading. The comments are based upon this table: Strength Meaning -30 Amazing -67 Very Good -70 OK -80 Not Good -90 Unusable It gets the Wifi signal strength from the /s_wifisig system variable and uses the ant statement to apply the correct comment based on the signal. Program --- Simple Wifi Signal Program Version 2 This is a slightly more advanced version of the Simple Wifi Signal Program, that displays a comment next to the Wifi signal reading. --- prog_vars = d/run_no 0 d/signal 0 prog_vars. prog_start = "Wifi Signal Program" prog_start. prog_loop = -- Display the Wifi Signal Strength -- "Run /run_no Wifi signal /s_wifisig" /signal /wifisig ant /signal -> <= -90 -> "Run /run_no /signal Unusable" <= -80 -> "Run /run_no /signal NOT Good" <= -70 -> "Run /run_no /signal OK" <= -67 -> "Run /run_no /signal Very good" <= -30 -> "Run /run_no /signal Amazing" -> "NO Signal" ant. -- 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.
- Repeat Command Test
This test program use repeat in all of the various manners it can be used in. < Back Repeat Command Test This test program use repeat in all of the various manners it can be used in. Program --- Repeat Command Test Program --- prog_vars = d/count 1 d/rand_no 0 d/servo_pos 0 d/do_reps 0 prog_vars. prog_start = print "Repeat Test Program" pticks 5 /count 0 /rand_no 0 prog_start. prog_loop = print "Main Loop /count" inc /count -- flash user led 10 times with 50ms delay. repeat 10 -> pulse d1 50 -- Print rand no -100 to 100 rand -100 100 -> /rand_no|print "RND1 /rand_no" -- Display 5 random numbers between 1 - 100 repeat 5 -> rand 1 100 -> /rand_no|print "RND2 /rand_no" repeat 5 rand 1 100 -> /rand_no print "RND3 /rand_no" repeat. -- Exit the repeat if we get a rand no > 25 repeat 5 rand 1 100 -> /rand_no print "RND4 /rand_no" any /rand_no > 25 -> print "Exit rep"|skipout repeat. -- Flash some lights repeat 10 -> tg a1|tg a5|tg d1 -- Step a servo through 180 deg use 18 reps div 180 10 -> /do_reps repeat /do_reps -> print "Servo pos /servo_pos" -- Set the servo position. svp a1 /servo_pos -- Leave the repeat early. any /servo_pos >= 9 -> skipout -- Inc the /servo_pos by 10 inc /servo_pos 10 repeat. -- exit after 15 runs. any /count >= 15 -> print "Qu /count"|exitprog prog_loop. prog_stop = print "Prog STOPPED!" prog_stop.
- RGB Color Sensor Demo 1
This simple program prints the colors from the RGB color sensor connected to port D of the JackBord. < Back RGB Color Sensor Demo 1 This simple program prints the colors from the RGB color sensor connected to port D of the JackBord. Program --- RGB Color Sensor Demo 1 This simple program prints the colors from the RGB color sensor connected to port D of the JackBord. --- prog_vars = d/count 0 d/red_line 0 d/green_line 0 d/blue_line 0 d/clear_line 0 prog_vars. prog_start = pclear print "RGB Color Sensor Demo 1: Start" -- Enable the I2c system i2con prog_start. prog_loop = -- main program loop -- print the readings from the RGB Color sensor. print "C /cs_clear R /cs_red G /cs_green B /cs_blue" -- Set the USER 1 LED to the color. l1 /cs_red /cs_green /cs_blue -- Wait 1sec d1000 -- RUn 100 times any /count >= 100 -> exitprog inc /count prog_loop. prog_stop = print "Bye" prog_stop.
- Store Light Readings in an Array
Get voltage readings from a light dependent resistor (LDR) light sensor and store in an array called ldr. Next we plot the readings stored in the array. The store_data task collects the readings and stores them the plot_data task plots them. The LDR is attached to +3v and a 100K resistor is below it. < Back Store Light Readings in an Array Get voltage readings from a light dependent resistor (LDR) light sensor and store in an array called ldr. Next we plot the readings stored in the array. The store_data task collects the readings and stores them the plot_data task plots them. The LDR is attached to +3v and a 100K resistor is below it. Program --- Get voltage readings from a light dependent resistor (LDR) light sensor and store in an array called ldr. Next we plot the readings stored in the array. The store_data task collects the readings and stores them the plot_data task plots them. --- prog_vars = d/ldr[1000] 0 prog_vars. prog_start = print "Plot ldr data" -- Setup the LDR sensor on Port B1 -- Range is 0 to 100 gvr b1 0 100 -- Setup USER led pwm d1 0 prog_start. prog_loop = store_data 50 plot_data 50 exitnow prog_loop. store_data /no_of_points 0 = -- Get light readings from the ldr and store -- in the /ldr array print "Get /no_of_points of light readings" d/point_no 0 -- Get the ldr readings and store repeat /no_of_points -> -- Store the new value. /ldr[/point_no] /b1 print "/point_no /b1" -- Plot the sine value we just stored -- tbar . /b1 0 25 "/point_no /b1" -- Set USER brightness based on plot value pwm d1 /b1 inc /point_no repeat. store_data. plot_data /plot_points 0 = -- Plot the ldr stored in the /ldr array. print "Plot /plot_points Stored in LDR data Array" d/plot_no 0 pwm d1 0 repeat /plot_points -> -- Plot the ldr data tbar . /ldr[/plot_no] 0 25 "B /plot_no /ldr[/plot_no]" -- print "B /plot_no /ldr[/plot_no]" -- Set USER brightness based on plot value pwm d1 /ldr[/plot_no] inc /plot_no repeat. plot_data. prog_stop = print "Good bye" prog_stop.
- Actuator Commands
Command Guide < Back Actuator Commands calstr - Run the steering limit switch calibration routine Purpose This routine is for robots using a linear actuator steering system with left, center and right steering limit switches fitted. The routine establishes the range of the steering actuator and the location of the centre limit switch in terms of pulses applied to the linear actuator. It also determines the travel length of the actuator in terms of the number of pulses required to move it through it’s full range. Syntax calstr Notes This is for robots with a linear actuator steering system. Once the calibration has been successfully completed the steering system will automatically use the new values so that the various built in steering functions will work as expected. mvsa - Move linear steering actuator Purpose Moves the steering actuator into a new position. Syntax mvsa pos Arguments pos The new position measured in pulses required to reach that position. Examples mvsa 0 mvsa 100 Notes The required pulses need to be determined by running the calstr command first. vdl - Drive System Limit Switch Status Purpose Display the current Drive System Limit Switch Status Syntax vdl Example > vdl < LAct Steering: Limits Regs L0C0R0 HW State Cal L 0 C 0 R 0 C 0 R 0 POS 0
- sled Example 8 LED Program
This program works with a strip of 8 smart RGB leds connected to the SLED pin on port E (pin E1 in some models.) It randomly chnages the color of each LED. < Back sled Example 8 LED Program This program works with a strip of 8 smart RGB leds connected to the SLED pin on port E (pin E1 in some models.) It randomly chnages the color of each LED. Program --- sled Example Light Program This program works with a strip of 8 smart RGB leds connected to the SLED pin on port E (pin E1 in some models.) It randomly chnages the color of each LED. --- prog_vars = d/count 0 d/led_no 1 d/color 0 d/no_of_leds 8 prog_vars. prog_start = print "Program Start" -- Set the number of LEDS sledn /no_of_leds 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 /led_no /color inc /led_no -- Return to first led. any /led_no > 8 -> /led_no 1 prog_loop. prog_stop = print "Bye" prog_stop.
- Sensors - Sound Detection
Use the simple sound detector module to determine if there is sound above a pre-set threshold. < Back Sound Detection Use the simple sound detector module to determine if there is sound above a pre-set threshold. In this exercise we use a simple on/off sound module to detect sounds. Use the simple sound detector module to determine if there is sound above a pre-set threshold. The threshold is set by using a small Philips screw driver to adjust the square blue variable resistor on the lower right side of the module. The output on the modules OUT pin is normally 5V when there is no sound. When a sound is detected it will drop to 0V and this is how the JackBord can detect sounds. Connect the sound sensor to Port A1, the Port A 5V supply and grounds of the JackBord as shown in the table below. Note the names of the pins on the detector module and the corresponding pins they connect to on the JackBord. When connected correctly it should look like this: Testing: With the module attached as above and the JackBord turned on enter the following command: btp a1 tg d1 When run this command treats the sound module as a button input. Each time the module detects a sound its output goes low, when there is no sound it goes high. Also the red led on the module will light up when it detects a sound. If the module does not seem to detect any sound try adjusting the blue variable resistor a little and try again. Or if it seems to be over sensitive to sound try adjusting the sensitivity down. Table of OUT values for the sound sensor module. Previous Next
- Sensors - 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. < Back 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. 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. Quick Commands To setup the sensor and get some raw readings from it run the command below: (this assumes the sensor is on port A1) gvr a1 0 100 This gets the voltage reading from the sensor and scales it between 0 and 100, with 100 being the maximum gas reading. Some Useful Resources Understanding a Gas Sensor MQ4 Sensor Datasheet mq4_sensor .pdf Download PDF • 161KB NOTES AND CAUTIONS The sensor gets hot during use so make sure it has plenty of air flow Do not get the sensor wet The sensor is powered from 5V The JackBord is NOT waterproof, so don't allow it to become wet The sensor needs some time to warm up, the manual states about 24hours but you can start using it after about 10 minutes. Parts of the Sensor Power LED - Turns on when the power is applied. Trigger LED - Turns on when gas is detected. The selection threshold is set via the variable resistor. Variable Resistor - Used to adjust the sensitivity of the digital output. Gas Sensor - This is the sensor that detects the gas. How it Works The sensor composed by micro AL2O3 ceramic tube, Tin Dioxide (SnO2) sensitive layer, measuring electrode and heater are fixed into a crust made by plastic and stainless steel net. An internal heater provides the heat required for the sensor to work. The sensor module has two outputs: DO which is a digital logic output and AO which is the analog output. Input and Output Pins The pins of the sensor are listed below: Connecting the Sensor to the JackBord 1. Bolt the sensor to the side of the JackBord on Port A as shown below 2. Connect the 5V power, ground, and analogue jumpers to Port A as shown below in the diagram Connections to the JackBord. The white jumper goes from the sensor's analogue output into the JackBord's port A1 pin. Using the Sensor Once the sensor is connected to the JackBord, we can get the readings from it by using port pin a1 as an analogue input. To set a1 as an analogue input type this command at the command prompt: gvr a1 1 100 This command takes the analogue output from the sensor and scales it between 0 and 100. Previous Next
- Raspberry Pi Shake Test Program 2 Aug 2021
This is a test program. It plots the data on two charts. < Back Raspberry Pi Shake Test Program 2 Aug 2021 This is a test program. It plots the data on two charts. Program --- Raspberry Pi Shake Test Program --- prog_vars = d/count 0 d/xpos 0 d/pro_EHZ 0.0 d/prev_EHZ 0.0 d/pro_EHZ_max 0.0 d/prev_EHZ_max 0.0 d/range_EHZ 0.0 prog_vars. prog_start = pclear d1000 -- Display the Title. ptl 100 -15 ^ts=24^tc=blue^ "Raspberry Shake Alert Program" -- Add Quit Button pb 25 50 ^n=Quit^p=exitprog^ prog_start. prog_loop = -- main program loop inc /count -- Stop after 10,000 readings any /count >= 10000 -> exitprog any /count >= 3 -> -- grsk AM.R5C47 -- TKMP grsk AM.R7DD4 -- Pcol d500 -- d-trend the reading sub /rs_EHZ /prev_EHZ -> /pro_EHZ -- Invert the negative values abs /pro_EHZ -> /pro_EHZ sub /rs_EHZ_max /prev_EHZ_max -> /pro_EHZ_max abs /pro_EHZ_max -> /pro_EHZ_max sub /rs_EHZ_max /rs_EHZ_min -> /range_EHZ abs /range_EHZ -> /range_EHZ d/title "My Graph Title" -- Plot the pro_EHZ geophone value plot 10 100 ^id=rs^n=/title^t1n=EHZ^t2n=Max^xdp=100^xp=/xpos^v1=/pro_EHZ^v2=/pro_EHZ_max^ plot 10 400 ^id=ra^t1n=EHZ^t2n=Max^xdp=100^xp=/xpos^v1=/rs_EHZ_max^v2=/range_EHZ^ -- Display the plot value ptl 30 20 ^ts=16^ "X /xpos > EHZ /rs_EHZ pro EHZ /pro_EHZ max /pro_EHZ_max" -- Check for a Quake any /pro_EHZ >= 500 -> -- YES we have a quake ptl 100 40 ^ts=25^tc=red^ "Tapapa Hopukina Kia mau" else -- NO no quake ptl 100 40 ^ts=25^tc=Lime^ "OK" enda. -- Next Xpos inc /xpos enda. -- Update the previous value. /prev_EHZ /rs_EHZ /prev_EHZ_max /rs_EHZ_max prog_loop. jack = tg l1 jack. prog_stop = ptl 525 5 ^ts=75^ "Bye" prog_stop.
- Logic Input Detector
This program turns Port A pins a1 and a2 into logic inputs with pullup resistors so that they are naturally at logic level 1. Shorting them to ground will make them 0. We use the any statement to detect when they are low. < Back Logic Input Detector This program turns Port A pins a1 and a2 into logic inputs with pullup resistors so that they are naturally at logic level 1. Shorting them to ground will make them 0. We use the any statement to detect when they are low. Program --- Logic Input Detector This program turns port A pins a1 and a2 into logic inputs with pullup resistors so that they are naturally at logic level 1. Shorting them to ground will make them logic level 0. We use the any statement to detect when they are low. --- prog_vars = d/count 5 prog_vars. prog_start = print "Setup Program" /d1 0 -- Set Port A1 & A2 as inputs with pullups spm a1 1 spm a2 1 prog_start. prog_loop = -- Check if pin A1 is Low, turn User Led off any /a1 = 0 -> /d1 0 -- Check if pin A1 is High, turn User Led on any /a1 = 1 -> /d1 1 -- Check if pin A2 is Low, turn C1 off any /a2 = 0 -> c1 0 enda. -- Check if pin A2 is High, Turn C1 on any /a2 = 1 -> c1 1 enda. prog_loop. prog_stop = print "Bye" prog_stop.
- Romeos Infrared Remote Control Driving Program
This program allows a JackBord to with drive motors to be driven using a normal TV remote control. < Back Romeos Infrared Remote Control Driving Program This program allows a JackBord to with drive motors to be driven using a normal TV remote control. Program --- Romeos Infrared Remote Control Driving Program 22 July 2021 This program allows a JackBord with drive motors to be driven using a normal TV remote control. --- prog_vars = d/count 0 d/color 0 d/pos 50 d/neg -50 prog_vars. prog_start = pclear stop -- Claw up and open svp c1 0 svp c2 180 print "Program Start neg /neg pos /pos" prog_start. prog_loop = -- pclear -- "/s_ird neg /neg pos /pos" -- Motion Control any /s_ird = 505 -> sbms /pos /pos any /s_ird = 481 -> sbms /pos /neg any /s_ird = 515 -> sbms /neg /neg any /s_ird = 527 -> sbms /neg /pos any /s_ird = 542 -> sbms 0 0 -- Claw control any /s_ird = 513 -> svp c1 0 any /s_ird = 541 -> svp c1 50 any /s_ird = 511 -> svp c2 0 any /s_ird = 418 -> svp c2 180 -- Speed Control any /s_ird = 517 -> /pos 40|/neg -40 any /s_ird = 519 -> /pos 60|/neg -60 inc /count any /count >= 5 -> rand 1 15 -> /color l1 /color rand 1 15 -> /color l2 /color rand 1 15 -> /color l3 /color /count 0 enda. prog_loop. prog_stop = bms 0 print "Bye" prog_stop.
- Robot Arm
An example of a robot arm. < Back Robot Arm An example of a robot arm. Program --- Robot Arm Program --- prog_vars = d/count 0 d/color 0 d/ledno 1 prog_vars. prog_start = print "Program Start" sledn 7 -- Setup arm buttons btp u1 svp a1 0 btp u2 svp a1 50 btp u3 svp a2 0 btp u4 svp a2 80 d/posa1 0 d/posa2 0 repeat 12 -> svp a1 /posa1 svp a2 /posa2 d250 inc /posa1 5 inc /posa2 5 "pos /posa1" repeat. repeat 12 -> svp a1 /posa1 svp a2 /posa2 d250 dec /posa1 5 dec /posa2 5 repeat. prog_start. prog_loop = sled /ledno /color inc /ledno inc /color any /ledno >= 7 -> /ledno 1 any /color >= 15 -> /color 0 prog_loop. prog_stop = print "Bye" prog_stop.
- Any and All Statement Text Test
This program tests the any and all statements with text values. The test values are all text. < 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.
- Electronics
Electronics This page will help you get started with electronics, specifically with the JackBord TOP. Below you will find the Using the TOP Guide , which will help you grasp the basics of electronics and how to use your TOP. You will also find a variety of videos to help you on your journey. Using the TOP Guide PDF Videos Learn how to use the TOP with our helpful videos! These introduce the basics of electronics and the JackBord TOP. Electronics Play Video Play Video 06:52 Using the TOP Part 1 The JackBord TOP helps you explore the JackBord and learn basic electronics. This is the first in a series of 4 videos about the JackBord TOP and basic electronics. In this video we cover: * What the JackBord TOP is * The parts of the TOP In part 2 we learn how to attach the TOP to the JackBord, connect the power supply, how jumper wires work and the basics of circuits and circuit diagrams. In part 3 we learn more about the JackBord, the TOP and basic electronics by doing practical tasks. Finally part 4 has more fun tasks and introduces some more electronics concepts like analog inputs. These videos are companions to the JackBord Journeys book "Using the TOP". You can find the other videos and the JackBord Journeys book by visiting www.JackBord.org and clicking on the Start here link on the top left of the homepage. 0:00 Using the TOP Part 1 00:42 Parts of the TOP 01:05 Power Supply Pins 01:26 Electronic Components 03:17 User Pins 04:00 Transistors 04:23 Terminal Block 04:48 Light Dependent Resistor LDR 05:03 Smart RGB LED 05:20 Light Emitting Diodes (LEDs) 05:44 RGB LED 06:00 Power Supply Pins for the JackBord Play Video Play Video 06:51 Using the TOP Part 2 The JackBord TOP helps you explore the JackBord and learn basic electronics. This is the second in a series of 4 videos about the JackBord TOP and basic electronics. In this video we cover: * Attaching the TOP to the JackBord * How jumper wires work * Introduce basic circuit concepts and circuit diagrams * Build a simple LED circuit In part 3 we learn more about the JackBord, the TOP and basic electronics by doing practical tasks. Finally part 4 has more fun tasks and introduces some more electronics concepts like analog inputs. These videos are companions to the JackBord Journeys book "Using the TOP". You can find the other videos and the JackBord Journeys book by visiting www.JackBord.org and clicking on the Start here link on the top left of the homepage. 0:00 Introduction 0:15 Attaching the TOP to the JackBord 0:50 Using Jumper Wires 1:30 Connecting the JackBord's Power Supply to the TOP 2:00 Connecting the Ground Wire 2:07 Connecting the 3V Wire 2:15 Connecting the 5V Wire 3:00 Jumper Wires and Circuit Diagrams 3:35 Some Basic Circuit Symbols 4:06 Using the Pin Numbers on the TOP 4:20 A Simple LED (Light Emitting Diode) Circuit Example 5:45 Summary Play Video Play Video 14:29 Using the TOP Part 3 The JackBord TOP helps you explore the JackBord and learn basic electronics. This is the third in a series of 4 videos about the JackBord TOP and basic electronics. In this video we complete some fun tasks like: * Turning an external LED on and off with the JackBord * Using pulse width modulation to control the brightness of an LED * Making a dynamic rainbow * Using buttons * Making a switch from scratch Finally part 4 has more fun tasks and introduces more electronics concepts like analog inputs. These videos are companions to the JackBord Journeys book "Using the TOP". You can find the other videos and the JackBord Journeys book by visiting www.JackBord.org and clicking on the Start here link on the top left of the homepage. 0:00 Using the TOP Part 3 00:20 Things You Will Need 00:50 Task 1: Control an External LED (Light Emitting Diode) 02:40 Task 2: Controlling the Brightness of the LED 03:35 Task 3: LED Rainbow 05:08 Task 4: Flashing Rainbow 05:22 Daisy-chaining Commands 07:20 Task 5: Button Press 08:51 Task 6: Button Release 10:12 Task 7: Make a Switch 10:59 Terminal Blocks Play Video Play Video 08:16 Using the Smart RGB LED on the JackBord TOP In this video we learn how to use the smart RGB LED on the JackBord TOP. Because the smart RGB LED has its own little computer built in you can do all sorts of things with it. For more information visit www.JackBord.org This videos tmt code is: tmt3NneN 0:00 Using the Smart RGB LED on the JackBord TOP 00:31 Some theory 01:09 Smart RGB LED 01:46 Connecting the smart RGB LED to the JackBord 02:27 Check your connection 02:49 Using the smart RGB LED 03:46 Turning the RGB LED off 03:56 Setting individual colors 05:20 Changing the LED brightness 06:01 Color table 06:08 How it works 06:50 Example programs 06:57 Demo program no 1 07:11 Demo program no 2 07:30 Summary Play Video Play Video 07:21 Using the RGB LED on the JackBord TOP In this video we learn how to use the RGB LED on the JackBord TOP. To visit the JackBord TOPs home page goto www.JackBord.org and type tmt4CKk at the search prompt and press Enter. For more information visit www.JackBord.org 0:00 Using the RGB LED on the JackBord TOP 00:33 Some Theory 01:14 RGB LED 02:10 Connecting the RGB LED to Port C on the JackBord 03:55 Check your Connection 03:56 Using the RGB LED 05:25 How RGB LED works 06:28 Summary
- Combining any and all Statements Together Example
In this example program we combine any and all statements to make more complex decisions possible in Octagon. < Back Combining any and all Statements Together Example In this example program we combine any and all statements to make more complex decisions possible in Octagon. Program --- Combining any and all statements example program --- prog_vars = d/pin1 0 d/pin2 1 d/pin_no 0 prog_vars. prog_start = print " -------------- " print "any and all combination example program" prog_start. prog_loop = -- Test 1 Should be FALSE ie /pin_no < 1 /pin1 0 /pin2 1 /pin_no 0 all /pin_no >= 1 /pin_no <= 5 any /pin1 = 0 /pin2 = 1 -> print "Test 1 TRUE WRONG" else print "Test 1 FALSE CORRECT" exitprog enda. -- Test 2 Should be FALSE ie /pin_no > 5 /pin1 0 /pin2 1 /pin_no 10 all /pin_no >= 1 /pin_no <= 5 any /pin1 = 0 /pin2 = 1 -> print "Test 2 TRUE WRONG" else print "Test 2 FALSE CORRECT" exitprog enda. -- Test 3 Should be FALSE ie all anys are false /pin1 1 /pin2 0 /pin_no 3 all /pin_no >= 1 /pin_no <= 5 any /pin1 = 0 /pin2 = 1 -> print "Test 3 TRUE WRONG" else print "Test 3 FALSE CORRECT" exitprog enda. -- Test 4 Should be TRUE ie all is ok and 1 any is true /pin1 0 /pin2 0 /pin_no 3 all /pin_no >= 1 /pin_no <= 5 any /pin1 = 0 /pin2 = 1 -> print "Test 4 TRUE CORRECT" else print "Test 3 FALSE WRONG" exitprog enda. -- Test 5 Should be TRUE ie all is ok and 1 any is true /pin1 1 /pin2 1 /pin_no 3 all /pin_no >= 1 /pin_no <= 5 any /pin1 = 0 /pin2 = 1 -> print "Test 5 TRUE CORRECT" else print "Test 5 FALSE WRONG" exitprog enda. prog_loop. prog_stop = print "Bye" prog_stop.
- Learn
Getting Started The recommended pathway for the JackBord activities is to complete the guides level by level, in the order of Electronics, Programming, Sensors, Control, then Robotics. For example, you would do all level 1 subjects before moving on to any of the level 2 subjects. However, this is not an enforced rule - feel free to jump ahead if the content is too easy, you want to learn something specific for a project, or are looking for a referenced activity. User Guides Here are the instructional guides explaining how to use your JackBord and its components. View More Student Guides For Learners: These guides will help carry you through the different activities and concepts you learn along the way. Starting from level 1, a complete beginner, to level 8, university level. Teacher Guides For Teachers: These guides will help you teach the content in the classroom. They provide a little bit more information and context which can help you, and your students, understand the how, what, and why. View More Projects These are standalone projects submitted by our team and users. You will find tons of cool projects to work on and impress friends and family! View More Subject Codes Each subject has a code that is 4 digits. The first 2 digits are the subject code, and the fourth digit is the level. For example - 1001 is Electronics level 1, and 1002 is Electronics level 2. For some subjects, the 3rd number is a sub-subject. For example - 2001 is coding level 1, and 2011 is programming level 1.
- Octagon Long Argument Test
This is a test program for the task arguments in Octagon. < 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.



