If you have news to add, please go to the Contact Us page, and send a message - thanks. 

 Don'r miss the 20th Feb entry below for logging runs.
See the  Programs page for a listing of the programs loaded onto the robots

9th October

The Interrupt page has been updated to show you how to detect the stop marker better.

17th September 

A new UKMARS import file exists to work with the new piggyback board. 

Download: UKMARS_V2    view:  text

21st July
The Pico has an input (pin 30 "Run") which can be used to re-start your python program without switching off.
This means that the Bluetooth module doesn't need to be re-connected at the start of each run.
A push button needs to be connected between pin30 and ground (pin23)

20th July
Pi Pico Python supports interrupts.

This means that the main program doesn't have keep scanning for stop markers, and you don't need two threads.
Instead, you set up a function to be run whenever the stop sensor input changes state (0>1 or 1>0).
That function can keep a count of stop markensorrs, which the main program can check every now and then.
See the page on interrupts. Program Drag6 (text) uses interrupts. 

There does need to be changes made to the stop sensor. 

It must have the LED and phototransistor resistors checked so that the output for white is well below the 1.6 volt threshold, for black it is well above 1.6 volts. 

16th July:
The Pi Pico supports running two programs concurrently.
This means that one program can be checking for the stop sensor,  while the other is running the motors in response to the line.
So the loop time can be 10 milliseconds (original design) while very short stop signals (2ms) can still be caught.
See Project 2threads to see the full design.


8th July:
The "time" import module has functions ticks_ms() and diff(),
which can accurately measure drag race run times. 
The new drag program Drag1e.py (txt)uses this to log the time AND send it via Bluetooth, at the end of the race. 
It is based on Alex's program from the6th July.

25th June:
The problem with the drag racer not always stopping is caused by the program
using the calibrate function to read the stop sensor, when you use paper to start the race.
So, If you hold the paper near the sensor, it expects the stop line on the track to be as bright. 

If you keep the white paper at ground level, it should work OK. 
The updated UKMARS.py file has a read function, that doesn't calibrate called "reads()" 

9th May:
There's a new line follower program that lets you slow down for the bends, and speed up on the straight
See the Page here.

26th April:

The Drag race worksheet has been updated
to describe the new Drag race starter program DRAG1.py
which saves results to a log file "log.txt" on the Pico! 

18th April :
The Programs page has a new program "Drag1.py"  which has almost everything you need for a Drag race. 
It does need the usual tuning, and some work setting up the speeds at different stages of the race. 

12th April:
There's a Tweaks page for all the line-following things to consider

5th April: There's an update to Worksheet 11 (Drag racing).
 It includes code for the method of starting using a white paper flag under the stop sensor.

28th March.


There's an include file called TVRTest1.py
  that lets you set 4 paramereter in the params.py file using a TV remote.
  see left


Instructions are here.

A version of WKS9z.py that uses it
   is also available.

24th March. 

New motors for robot UKM6 have been tested, 
and 
run at 1200 RPM. Old motors ran at 660RPM.

22nd March:
Wall following:

Worksheets 31, 32, 33 are now active for the UKMARS robot.
Worksheets 31 and 32 are active for  Wham

10th March:
Robot 8 now fixed. The 7486 chip under the regulator board was plugged in the wrong way round.
Its UKMARS.py import file is out-of date and won't work with the newer line-follower programs.

See the new Programs page for a list of all the programs ine each robot, These are downloadable, or can be seen as text.

9th March:
There's a new proposal for Drag racing in Worksheet 11:
Step 2a - speed profile
Which could shave a little time off a run.
_______________________________________________________________________________________________________________________
7th March

There's a new version of UKMARS.PY on this website. 
It has a CheckStop() function that returns the number of stop markers found so far.
The following code  (download here) in the main loop will stop the robot at the second marker:
------------------------------------------------------------
    If (CheckStop() == 2):
        speed=0
        FOSpeed = 0
------------------------------------------------------------
The count can be reset to zero by calling this function:
    ClearStop()

If you print the value of CheckStop() in the startup calibration loop,
you will need to call ClearStop() when the start button is pressed,
in order to reset the marker count to zero.

1st March

Worksheet 32 is out. It deals with turning left when wall following

20th Feb

We can now log a run, with the settings, and run-time to a text file on the Pico

Try the following function to record stuff at the end of a run
# record stuff to log file
def logtext():
    pfile = open("log.txt","a")
    pfile.write("\r\n==========")
    pfile.write("\r\nspeed="+str(speed))
    pfile.write("\r\nmult="+str(mult))
    pfile.write("\r\ndfactor="+str(dfactor))
    pfile.write("\r\nloops="+str(loopcount))
    pfile.close()
    print("log.txt written")
The file "log.txt" will be created / added to each time you run.
loopcount will tell you the time!

Robot News

16th Feb Drag race progress

We have made the robot use loop counts to decide when to start using the stop sensor.
It now stops at the stop line of the drag race track.

However
 It was necessary to move our track's white stop marker closer to the central white line, for the robot to see it.
So, for use on the the offical track, we need to shift the robot's sensor outwards a bit,
 using some veroboard. See below:

14th Feb
Robots 1,2,4,5,6 all have aUKMARS stop sensor and stop LED fixed at the right hand side of the line sensor
Robot 3 has a QTR sensor attached, which does a similar job.

9th Feb

Robot UKM4 ran the line-follower track in 5.2 seconds.
UKM1 ran the track at a good speed