Search Results
285 results found with an empty search
- 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. < Back 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. This will be done by creating a potential divider circuit on the TOP to obtain a light-dependent voltage reading. This reading will then be used to control the brightness of an LED so that when it gets darker, the LED becomes brighter. PDF INSTRUCTIONS Project Gallery
- Plot Sine Wave on Show Page
This program plots a sine wave using the Show page. < Back Plot Sine Wave on Show Page This program plots a sine wave using the Show page. Program --- Store and Plot Sine Wave. Generate the values for a sine wave, store in an array and then plot them. --- prog_vars = d/point_no 0 d/current_angle 0.0 d/sine_value 0.0 d/plot_value 0 prog_vars. prog_start = pclear print "Plot a Sone wave" prog_start. prog_loop = plot_sine 100 0.0 exitnow prog_loop. plot_sine /no_of_points 0 /start_angle 0.0 = -- Generate the sine wave data points and plot them. print "Plot /no_of_points of Sine Wave" /current_angle /start_angle -- Loop through and plot the points repeat /no_of_points -> -- Calc the sine of the /current_angle sin /current_angle -> /sine_value -- Scale the Sine wave to fit. mapf -1 1 -50 50 /sine_value -> /plot_value plot 0 50 ^id=sine^w=500^h=200^xp=/point_no ^v1=/plot_value ^title=Sine Wave^ -- Next angle inc /current_angle 0.5 inc /point_no repeat. plot_sine. prog_stop = print "Good bye" prog_stop.
- Ant Command Test
This is a test for the ant command. < Back Ant Command Test This is a test for the ant command. Program --- Ant test Program --- prog_vars = d/count 0 prog_vars. prog_start = rdbg 5 /count 1 prog_start. prog_loop = test_ant 10 10 test_ant 1000 1000 exitprog prog_loop. test_ant /in_count 0 /int1 0 = print "Ant Test count /in_count " ant /in_count -> < -10 -> print "Count is < -10"|tg d1 /int1 < 0 -> print "Count is < 0"|tg d1 < 10 -> print "Count is < 10"|tg d1 < 100 -> print "Count is < 100 ERROR"|tg d1 < 200 -> print "JP99"|task1 /count -> print "Default Action" ant. print "POST the ant" test_ant. prog_stop = print "Bye" prog_stop.
- Sensors - 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. < Back 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. 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. CAUTION Don't place the sensor in soil or water past the white line The sensor is powered from 5V The JackBord is NOT waterproof, so don't allow it to become wet How the Sensor Works The sensor has an oscillator whose frequency is controlled by capacitance, and this capacitance is affected by the moisture content of the soil in which the sensor is placed. Under dry conditions the sensor's output will be 3V, and as the sensor gets wet the output voltage will fall until it reaches 0V. The type of soil will also influence the readings so some experimentation may be required. Sensor Pins The pins of the sensor are shown below. Note this is the top view. The pins are shown in order starting from the top and moving down. The best wire color is included so you get into the habit of using consistent wires for the ground and power supply as this will save you a lot of trouble in the future. Connecting the Sensor to the JackBord To make using the sensor easier we have fitted some longer wires which may then be connected to the JackBord via the TOP terminals. So we first need to connect the TOP to the JackBord, then we need to connect the sensor to the TOP Connecting the TOP We will use the JackBord TOP to aid in connecting the sensor to the JackBord. The table below lists the connections we will make. See the pictures below for each step. The connections we will make to the JackBord are given below. The sensor's output will go to pin A1 which will be set as an analog input. Follow these steps. First we will connect the various jumpers to the TOP, make sure that you have your TOP already mounted on the JackBord and that the power wires for the TOP have already been connected. 1. Turn off the JackBord 2. Connect the green jumper wire from ground on the TOP to pin 3 of the TER, this is the 3 pin terminal block at the top of the TOP. 3. Connect the orange jumper wire to TER pin 2, then connect the other end to Port A1. This is the analog output from the sensor. 4. Connect the red jumper wire to the TER pin 1 and the other end to one of the +5V power pins on the top right of the TOP. This will supply power top the sensor. Once you have made the connections check them against the picture below and make sure they match. Now that the TOP is connected to the JackBord we need to connect the sensor to the TOP. Follow the steps below. Connecting the Sensor to the TOP To connect the sensor to the TOP via the terminal follow these steps. You will need a Philips screwdriver for this step to tighten the screws on the terminal block. DO NOT TIGHTEN THEM TOO MUCH. 1. Get the sensors black wire and insert it into the lower hole on the terminal block as shown below, this is TER pin no 3. Tighten up the screw by turning it clockwise. You should not be able to easily pull the wire out of the terminal. 2. Get the sensors yellow wire, this is the analog output wire, and connect it to the second terminal block slot as shown below, this is TER pin no 2. 3. Connect the sensors red wire to pin TER 3 of the terminal block. This is the 5V power supply from the JackBord to the sensor, this is TER pin no 1. Check your connections, they should look like the picture below. Also make sure the terminal block screws are tight enough, but not too tight. Using the Sensor with the JackBord Now that the sensor is connected to the JackBord turn it on and log into your dashboard. A convenient way to represent soil moisture is as a percentage where 0% is very dry and 100% is saturated. But the sensor is the opposite, it puts out 0V for wet and 3V for dry. Thus we need a way of scaling the readings between 0% for dry and 100% for wet. The gvr command will let us get the voltage reading from pin A1 and scale it between 0 and 100 such that the reading will increase with increasing moisture. At the command prompt, type the command below: gvr a1 100 0 This turns pin a1 into an analog input and tells it to scale the voltage readings so they are in the range 100 to 0, where 100 = 0V and 0 = 3V, remember the sensor puts out 0V for high moisture, which we want to be 100%. This is why the 0 and 100 in the gvr command are the opposite way around to what they would normally be. Go to the LIVE page and you should start to see readings from the sensor. Note: It does take a sensor a while to register an increase in soil moisture so don't be surprised if it takes between 20 and 30 seconds to respond. Testing the Sensor In Dry Air First get a reading for dray air, i.e. the sensor is by itself. This will be between 0 and about 10. Ours was 6. In Water: Now get a glass of water and place the sensor in it, be careful the water does NOT go past the line on the sensor, as shown below: BE CARFUL not to get the electronics wet. Now look at the live page and you will see the reading is about 50 to 60, yours will vary but should be about this. Ours was 57. We now have our two extreme readings, these tell us the minimum and maximum values we can expect from the sensor. Now its time to do some tests in soil and see how the sensor responds. In Dry Soil: Get a glass and put some dry soil in it. Make sure the soil level is high enough to reach just below the white line on the sensor. Now look at the readings and see what you get. For ours we got a reading of 18. In Moist Soil: Add some water to the soil, to just wet it but not soak it. Check the reading from the sensor, ours was about 33. In Soaked Soil: For this one add enough water that all of the soil is completely wet but there should NOT be pools of water at the top. Take a reading, ours was 57. In Flooded Soil: This is the last case and for this we add water such that there are pools of it at the top of the soil. This represents the maximum amount of water we can possibly get into the soil. Take a reading, ours was 58 which is about right. Dry Air Reading: Remove the sensor from the wet soil and clean it. Then check the reading has returned to its previous dry air value of about 6. Final Table of Soil Moisture Readings from the Sensor The table below lists the calibration values we got from the sensor. Yours will differ, this can be caused by things like the type of soil etc. Final Calibration Values: The final calibration values we got for our sensor are: These values will be used to set the initial values of the /min_value and /max_value variables in the basic soil moisture program below. https://www.jackbord.org/jobs/basic-capacitive-soil-moisture-sensor Project: Portable Soil Moisture Meter Once you have completed the above and got the sensor working properly, you can use the Basic Soil Moisture Meter Program to turn your JackBord into a stand alone soil moisture meter that will display the soil moisture reading as the color of the USER LED on the front of the JackBord. Run the Program Automatically on Start Up: If you want to have the soil moisture program run on boot use the setboot command to have the JackBord run the soil moisture meter program after its turned on. For example if your program is in program no 8 on the PROG page you would type: setboot 8 From now on the program will run when the JackBord is turned on. To stop running it automatically type: setboot 0 By default the program will take 100 measurements and then exit, to disable this and have it run continually coment out the line below in the code: any /count >= 100 -> exitprog Previous Next
- Button Task
This program displays a button on the Show page and displays the number of times it has been pressed in real time. It runs a task called b_press each time the button is pressed. < Back Button Task This program displays a button on the Show page and displays the number of times it has been pressed in real time. It runs a task called b_press each time the button is pressed. Program --- Button Task Program --- prog_vars = d/count 0 prog_vars. prog_start = pclear print "Button Task Program Start" -- Set button to run b_press task when pressed. pb c c ^p=b_press^n=Run Task^ b_press prog_start. prog_loop = -- main program loop patdog prog_loop. b_press = inc /count ptl c d "Button Presses /count" b_press. prog_stop = print "Bye" prog_stop.
- Simple WiFi Signal Dial with an RC Servo
This is the program for the Simple Wifi Signal Dial with an RC Servo, which is used in it's respective project as well as activity 4001-act11. This is what makes the WiFi signal control the servo arm < Back Simple WiFi Signal Dial with an RC Servo This is the program for the Simple Wifi Signal Dial with an RC Servo, which is used in it's respective project as well as activity 4001-act11. This is what makes the WiFi signal control the servo arm Program --- Simple Wifi Signal Metre with an RC Servo 4001-act11 --- prog_vars = d/run_no 0 d/arm_angle 0 prog_vars. prog_start = pclear "4001-act11 Simple Wifi Signal Metre with an RC Servo Program" svp a1 0 prog_start. prog_loop = -- Calc the arm angle. mapi -90 -30 0 180 /s_wifisig -> /arm_angle -- Set the servos arm svp a1 /arm_angle -- Display the Wifi Signal Strength "Run /run_no Wifi signal /s_wifisig Arm /arm_angle" inc /run_no prog_loop. prog_stop = print "Bye" svp a1 0 prog_stop.
- Sensors - Infrared Obstacle Avoidance
This unit will detect the presence of objects at distances of between about 2cm to 30cm. < Back Infrared Obstacle Avoidance This unit will detect the presence of objects at distances of between about 2cm to 30cm. The Infrared Obstacle Avoidance Sensor will detect the presence of objects at distances of between about 2cm to 30cm. It uses an infrared emitting diode to send out an IR signal. Should the signal hit a nearby surface, it will be reflected back to the sensor and the output will go low or to 0V. The potentiometer is used to adjust the sensitivity of the sensor. Turning it anticlockwise will reduce the detection range so it detects closer objects, turning it clockwise increases the sensitivity and it will detect objects farther away. How the Sensor Works The output pin is normally low and will go high when a person or an animal crosses the sensors beam. This beam is like a 100-degree-wide fan centered along the axis of the sensor looking out from the white dome. Note: Once the sensor is triggered it will take about 8 to 10 seconds for it to reset. Sensor Pins The table below lists the pins of the sensor. Connecting the Jumpers to the Sensor First we will connect the jumpers to the sensor. Then, we will connect it to the JackBord. The sensor needs a 5V supply to work. It needs 3 female to female jumper wires to connect to the JackBord. The output of the sensor can be connected to any of the pins on ports A, B or C. You need the following items: The sensor 3 female to female jumper wires, 10cm or more Connection Steps: Follow these steps to avoid damage to the JackBord or the sensor. The jumper wires are connected to the sensor as shown in the picture below. In our case, we have used a red jumper for the 5V power, a purple one for the output and a green one for ground. Connect yours by following these steps: Turn off the JackBord Connect a red female to jumper to the rightmost pin of the sensor, note this is with the sensor facing up as in the picture on the left. Connect a green or black jumper wire to the center ground pin. Connect a jumper for the output to the left pin. In our case we used a purple jumper. Check your sensor connections with the picture below. Here we have used a red wire for 5V, a purple one for the output and a green one for ground. Connecting the Sensor to the JackBord Now that we have the jumpers connected to the sensor we need to connect the other ends to the JackBord. These connections are listed in the table. We are going to connect the sensor to port Pin A1 on port A. We will also use port A's ground and 5V power line to keep things tidy. Follow these steps to connect the sensor to the JackBord: Turn off the JackBord Connect the green ground wire from the sensor to the ground pin on port A. Connect the red power wire from the sensor to the +5V pin on port A. Connect the purple output wire from the sensor to port pin A1 on the JackBord. Once you have made the connections check them against the pictures below and make sure they match. Using the Sensor with the JackBord Turn on the JackBord and go to the dashboard. We can use the button press and release commands, with this sensor so we can get the JackBord to take certain actions in response to the state of the sensor. When an object is detected the output will go high (3V) and once the object leaves the sensors view the output will go back to being low (0V). Example Commands: The commands below setup the sensor on port A1 so that when an object is detected the USER LED on the front of the JackBord will be turned on, this is accomplished by the bts command. The USER LED will turn off once the object leaves the field and this is because of the btr command. If needed clear any current button setup using the rstb command. btp a1 l1 1 btr a1 l1 0 Previous Next
- Sensors - 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. < Back 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. 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. Quick Commands To get the sensor working, assuming the analog pout is connected to port A a1 and the digital output is connected to a2, enter the commands below at the command prompt. gvr a1 0 100 get a2 The gvr a1 0 100 will result in the value of a1 increasing as an object moves away from the sensor. You can see this change on the LIVE page. Buttons The button press btp and button release btr commands can be used with this sensor. This example uses a button on port a pin a2 and turns the USER LED (l1) on when the sensor detects an object. Removing the object turns it off. btp a2 l1 1 btr a2 l1 0 Videos Getting Started Using the Sensor NOTES AND CAUTIONS: This sensor needs to be adjusted if you want to use the digital output It's maximum range is about 5cm Ambient lighting can affect the performance of the sensor Parts of the Sensor Power LED - Turns on when the power is applied. Detection LED - Turns on when an object is detected. Variable Resistor - Used to adjust the sensitivity of the digital output. Transmitter - The infrared transmitter. Receiver - The infrared receiver. How it Works The transmitter sends an infrared signal and the receiver receives any signal reflected by an object nearby. The closer the objects the stronger the infrared signal that's returned and the lower the output voltage on the analog output. The digital output will go high (3V) when an object is detected and the blue variable resistor sets the trigger threshold for the digital output. Input and Output Pins The sensor has two output pins described below: Connecting the Sensor to the JackBord First bolt the sensor onto port A using an M4 nut and bolt. This is because we're going to use the pins from port A to control the sensor and specifically we need the analog inputs on port A. Take a green jumper wire and connect it to the ground pin on the JackBord and take the other end and connect it to the green ground pin on the sensor. Connect a yellow jumper wire to the 3V pin on the JackBord on port A and then connect the other end to the 3V power input on the sensor. Connect a black jumper wire to the digital output of the sensor and the other end goes to port A pin a2. Connect the analog output of the sensor which is the white pin onto port pin a1 of the JackBord. When you are done it should look like the picture below: Previous Next
- Sensors - BME280 Temperature, Relative Humidity and Pressure
This sensor allows you to measure air temperature, relative humidity and atmospheric pressure. < Back BME280 Temperature, Relative Humidity and Pressure This sensor allows you to measure air temperature, relative humidity and atmospheric pressure. This sensor allows you to measure air temperature, relative humidity and atmospheric pressure. This sensor uses the i2c bus on Port D of the JackBoard. The basic specifications of the sensor are shown below: Specifications Temperature: Range: -40C to +85C Accuracy: +/-0.5C Relative Humidity: Range: 0% to 100% Accuracy: +/-3% Pressure: Range: 300mb to 1100mb Accuracy: +/-1mb You can find the data sheet for the sensor below: bme280 Sensor Specifications .pdf Download PDF • 1.59MB BME280 Commands These are some commands you can use with the BME280. i2con Enable the i2c system Purpose Turn on I2c System and update config. Syntax i2con i2coff Disable the i2c system Purpose Turn off I2c System and update config. Syntax i2coff f2c Find attached i2c devices Purpose This will scan the i2c port looking for attached i2c devices. When a new device is found it will be setup. Syntax f2c Examples > f2c < Finding I2C Devices.... < Setup BME280 temp on next free chan [26] < Setup BME280 RH on next free chan [27] < Setup BME280 Pressure on next free chan [28] Found 1 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. g2c Get register value from an i2c device Purpose This will get the value of the specified register from the specified i2c device address. Syntax g2c addr reg bytes Arguments addr The i2c devices address from the l2d command. 0 to 128 reg The register number from 0 to 256 bytes The number of bytes to expect back from the i2c device. 1 to 256. Pushers Yes Returns Nothing Examples > g2c 118 137 1 < g2c data 0[111] 1[0] final [111] Get reg no 137, one bytes from i2c address 118. Notes This can be used from the command line and in programs. l2c List active i2c devices & sensors Purpose Lists all of the active i2c devices connected to the JackBord’s i2c port. This will list all of the devices associated with each i2c address. Syntax l2c l2d List active i2c devices only Purpose Lists all of the active i2c devices connected to the JackBord’s i2c port. It only lists whole devices, not sub devices. Syntax l2d s2c Send data to i2c device register Purpose Send data to the specified register on the specified i2c device. All values are integers. Syntax s2c addr reg value Arguments addr The i2c devices address from the l2d command. 0 to 128 reg The register number from 0 to 256 value An integer value between 0 and 256. Pushers Yes Examples > s2c 118 137 23 ->/result Notes This can be used from the command line and in programs. v2c Show the status of the i2c system Purpose Displays the status of the i2c system including the number of devices connected and the i2c pins. Syntax v2c rsti2c Reset all i2c devices Purpose This will reset all of the i2c devices connected to the JackBord and remove them from the system. Syntax rsti2c Examples rsti2c Previous Next
- 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. < 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.
- Projects - 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. < 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
- Smart RGB LED Random Flashing
Smart RGB 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. < Back Smart RGB LED Random Flashing Smart RGB 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.
- Maths Functions Example
This is a small program showing the various maths functions in Octagon. < Back Maths Functions Example This is a small program showing the various maths functions in Octagon. Program --- Maths Functions Program Example --- prog_vars = d/a 10 -- integer var set to 10 d/b 100 -- integer var set to 100 d/c -3.141 -- float var set to -3.141 d/result 0.0 -- float to hold total prog_vars. prog_start = print "Maths Example Program no 1" prog_start. prog_loop = -- Display system var /pi print "Pi is /pi" add /a /b /c -> /result -- Add some numbers print "adding /a /b /c = /result" -- Set new value of /c /c 1.5 -- Subtract some numbers sub /a /b /c -> /result print "subtracting /a /b /c = /result" -- Multiply some numbers mul /a /b /c -> /result print "multiplying /a /b /c = /result" -- Divide some numbers div /a /b /c -> /result print "dividing /a /b /c = /result" -- Root of pi sqrt /pi -> /result print "root of pi is /result" -- New Values /a 25|/b 50|/c 100.0 -- Average of some numbers ave /a /b /c -> /result print "ave /a /b /c = /result" -- Analyse some numbers min /a /b /c -> /result print "min of /a /b /c is /result" max /a /b /c -> /result print "max of /a /b /c is /result" -- Hash of pi hash /pi -> /result -- Get a random number between 0 and 1000 rand 0 1000 -> /result print "Random number /result" print "Done exiting now!" exitprog prog_loop. prog_stop = exitprog prog_stop.
- RGB Light Mixer
Light Mixer Program Uses an RGB LED on Port C and two variable resistors on pin B1 and B2. B1 controls the RED LED on C1. B2 controls the RED LED on C2. < Back RGB Light Mixer Light Mixer Program Uses an RGB LED on Port C and two variable resistors on pin B1 and B2. B1 controls the RED LED on C1. B2 controls the RED LED on C2. Program --- Light Mixer Program Uses an RGB LED on Port C and two variable resistors on pin B1 and B2. B1 controls the RED LED on C1. B2 controls the RED LED on C2. --- prog_vars = d/a 0 prog_vars. prog_start = -- Setup the RED LED control, B1 gvr b1 0 100 c1 pwm c1 50 -- Setup the GREEN LED control, B2 gvr b2 0 100 c2 pwm c2 50 prog_start. prog_loop = exitnow prog_loop. prog_stop = "Good bye" prog_stop.
- Nested Ant Test
This program is to test the ability of Octagon to handle nested ant commands. < Back Nested Ant Test This program is to test the ability of Octagon to handle nested ant commands. Program --- Nested Ant Test Program 1 This program is to test the ability of Octagon to handle nested ant commands. --- prog_vars = d/a 0 d/b 0 d/c 0 d/run_no 0 prog_vars. prog_start = print "Nestedt Ant Test Program" rdbg 6 prog_start. prog_loop = "MMMMMMMMMMM MAIN run /run_no MMMMMMMMMMM" ant /run_no -> = 1 -> task1 /run_no = 2 -> task2 /run_no = 3 -> task2 /run_no -> default_task /run_no ant. "POST ANT" inc /run_no any /run_no > 5 -> exitprog prog_loop. task1 /t1_runs 0 = "ENTER T1" patdog 1 tg c1 ant /t1_runs -> = 1 -> "T1 Run 1" = 2 -> "T1 Run 2" -> "T1 Defaiult /t1_runs" ant. patdog 2 "EXIT T1" task1. task2 /t2_runs 0 = tg c2 "ENTER T2" ant /t2_runs -> = 1 -> "T2 Run 1" = 2 -> "T2 Run 2" = 3 -> "T2 Run 3"|task3 /t2_runs -> "T2 Defaiult /t2_runs" ant. "EXIT T2" task2. task3 /t3_runs 0 = "ENTER T3" tg c3 ant /t3_runs -> = 1 -> "T3 Run 1" = 2 -> "T3 Run 2" = 3 -> "T3 Run 3" -> "T3 Defaiult /t3_runs" ant. "EXIT T3" task3. default_task /d_run_no 0 = "ENTER default_task run /d_run_no" "EXIT default_task run /d_run_no" default_task. prog_stop = -- max /numarray[*] -> /maxnum -- print "the maximum number is /maxnum" print "bye" prog_stop. --- The peogram should produce this output: Nestedt Ant Test Program MMMMMMMMMMM MAIN run 0 MMMMMMMMMMM ENTER default_task run 0 EXIT default_task run 0 POST ANT MMMMMMMMMMM MAIN run 1 MMMMMMMMMMM ENTER T T1 Run 1 EXIT T1 POST ANT MMMMMMMMMMM MAIN run 2 MMMMMMMMMMM ENTER T2 T2 Run 2 EXIT T2 POST ANT MMMMMMMMMMM MAIN run 3 MMMMMMMMMMM ENTER T2 T2 Run 3 ENTER T3 T3 Run 3 EXIT T3 EXIT T2 POST ANT MMMMMMMMMMM MAIN run 4 MMMMMMMMMMM ENTER default_task run 4 EXIT default_task run 4 POST ANT MMMMMMMMMMM MAIN run 5 MMMMMMMMMMM ENTER default_task run 5 EXIT default_task run 5 POST ANT bye ---
- Octagon Drawing Example
This program draws various shapes on the Show page and is a good way of getting started with the drawing commands in Octagon. < Back Octagon Drawing Example This program draws various shapes on the Show page and is a good way of getting started with the drawing commands in Octagon. Program --- Octagon Drawing Program --- prog_vars = d/step 0 d/color 0 d/opacity 1.0 d/arc_angle 0 d/arc_radius 0 prog_vars. prog_start = pclear ptl f a ^ts=20^tf=verdana^ "JackBord Oactagon Drawing Program" psq t e 100 ^fc=red ^ pcr t h 50 ^fc=cyan ^ prect o j f e ^fc=yellow ^lc=yellow^lw=5^ prog_start. prog_loop = -- main program loop repeat 35 -> pal /step /step /step /step ^lc=/color ^op=/opacity ^lw=50^ mapi 0 520 0 360 /step -> /arc_angle mapi 0 520 0 100 /step -> /arc_radius parc 400 200 /arc_radius 0 /arc_angle ^lc=/color ^fc=transparent^lw=16^ inc /step 15 dec /opacity 0.05 any /opacity <= 0 -> /opacity 1.0 inc /color any /color >= 15 -> /color 1 ptl t c "step /step" repeat. exitprog prog_loop. prog_stop = print "Bye" prog_stop.
- 404 Error Page | Jackbord
Oops, this page isn't available. Sorry about that. It may still be a work in progress, or you may need to simply try again. Return Home
- Projects - 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. < Back 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. First, we learn how the JackBord measures WiFi strength, and then we learn how to attach a RC servo to the JackBord. We then create our own dial and attach it to the JackBord and the RC servo. Finally, we put it all together by running a program that controls the servo’s arm based on the strength of the WiFi. PDF INSTRUCTIONS Project Gallery
- Light Following Robot
In this program, the JackBord robot will follow a light. This uses two LDR light sensors, each controlling the opposite motor. < Back Light Following Robot In this program, the JackBord robot will follow a light. This uses two LDR light sensors, each controlling the opposite motor. Program --- Light Following Robot Program Robot will follow a light. Uses two LDR light sensors, each controlling the opposite motor. --- prog_vars = d/count 0 prog_vars. prog_start = "Light Following Robot Program" "Setup" -- Send left light sensor reading into right motor -- on channel 160 gvr b1 -50 75 160 -- Send right light sensor reading into left motor -- on channel 170 gvr b2 -50 75 170 prog_start. prog_loop = patdog prog_loop. prog_stop = -- Stop the program. print "Prog End!" -- Clear the gvr commands boff -- Stop the motors stop prog_stop.
- 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.





