Thursday, December 28, 2023

0000 0000 1101 1011

Mailbag #36

Well after the shocking reviews for my last two videos I've decided to do the old favourite - a mailbag!

Algorithm alone knows these are so popular, but as I'm behind on opening up my late night purchases I'd better get to it!

The only extra bit is the code I had to write for the two joystick Arduino module - I couldn't find anything online and so I cobbled together the following - which works fine.

/*
 *  Found this twin joystick module online here:
 *  https://www.aliexpress.com/item/1005001882246352.html
 *  
 *  ..but with no code I had to find out the pins for
 *  input and output, then made the code below to demonstrate
 *  the use of the module - enjoy!
 *  
 *  Exponential function provided by BARD
 *  https://bard.google.com/
 *  
 *  OneCircuit - https://www.youtube.com/@onecircuit-as
 *  Tue 26 Dec 2023 16:28:52 AEDT
 */
 
#define LjoyXaxis_pin A0
#define LjoyYaxis_pin A1
#define RjoyXaxis_pin A3
#define RjoyYaxis_pin A2
#define LSW_pin 2
#define RSW_pin 4
#define LLEDPin 9
#define RLEDPin 10

int LYLED = 0;
int RYLED = 0;
boolean LButton = 0;
boolean RButton = 0;

int exponentialMap(int S) {
  float base = 3.0;
  float normalizedS = S / 1023.0;
  float L = pow(normalizedS, base) * 255.0;
  return constrain(L, 0, 255);
}

void setup() {

  pinMode(LjoyXaxis_pin, INPUT);
  pinMode(LjoyYaxis_pin, INPUT);
  pinMode(RjoyXaxis_pin, INPUT);
  pinMode(RjoyYaxis_pin, INPUT);
  pinMode(LSW_pin, INPUT);
  pinMode(RSW_pin, INPUT);
  pinMode(LLEDPin, OUTPUT);
  pinMode(RLEDPin, OUTPUT);
  digitalWrite(LSW_pin, HIGH);
  digitalWrite(RSW_pin, HIGH);
  Serial.begin(115200);

}

void loop() {

  // Left joystick routines 
Serial.print("LX-axis:"); Serial.print(analogRead(LjoyXaxis_pin)); Serial.print(":"); LButton = 1 - digitalRead(LSW_pin); LYLED = 1023 - analogRead(LjoyYaxis_pin); Serial.print("LY-axis:"); Serial.print(LYLED); Serial.print(":"); if (LButton == 0) { // LYLED = map(LYLED, 0, 1023, 0, 255); // linear map // LYLED = pow(1.0054,LYLED); // exponential map LYLED = exponentialMap(LYLED); analogWrite(LLEDPin, LYLED); } else { analogWrite(LLEDPin, 0); } Serial.print("LSW:"); Serial.print(LButton);
  // Right joystick routines 
  Serial.print(" RX-axis:");
  Serial.print(analogRead(RjoyXaxis_pin));
  Serial.print(":");
  RButton = 1 - digitalRead(RSW_pin);
  RYLED = 1023 - analogRead(RjoyYaxis_pin);
  Serial.print("RY-axis:");
  Serial.print(RYLED);
  Serial.print(":");
  if (RButton == 0) {
    // RYLED = map(RYLED, 0, 1023, 0, 255); // linear map
    // RYLED = pow(1.0054,RYLED); // exponential map
    RYLED = exponentialMap(RYLED);
    analogWrite(RLEDPin, RYLED);
  }
  else
  {
    analogWrite(RLEDPin, 0);
  }
  Serial.print("RSW:");
  Serial.println(RButton);
  
  delay(100);
}

Thank you to BARD for the exponential mapping function - increase "float base = 3.0;" for a flatter curve.

User:
Can you suggest an Arduino function that maps 
numbers 0-1023 (S: from a joystick source)
to 0-255 (L: for an LED output), but instead of
mapping linearly it maps exponentially so that
values of S such as 300 map quite low to, for
instance, to an L value of 5, and a value of
L=600 maps to, for instance, S=25?

Bard:
Here's an Arduino function that maps
numbers 0-1023 to 0-255 exponentially,
as you described:

Arduino
int exponentialMap(int S) {
  // Adjust this base value to fine-tune the curve
  float base = 2.0;

  // Normalize S to a range of 0.0 to 1.0
  float normalizedS = S / 1023.0;

  // Apply exponential curve using pow() function
  float L = pow(normalizedS, base) * 255.0;

  // Clamp L to 0-255 range to ensure valid output
  return constrain(L, 0, 255);
}
Use code with caution. Learn more

Explanation:

Normalization: The normalizedS calculation ensures 
the input value S is within a 0.0 to 1.0 range, 
making it suitable for exponential calculations.

Exponential Mapping: The pow(normalizedS, base) 
expression applies the exponential curve. The base 
variable controls the steepness of the curve:

Higher base values result in a more pronounced 
exponential response.

Lower base values lead to a more gradual curve.

Scaling: The result of pow() is multiplied 
by 255.0 to scale it back to the 0-255 range 
for LED output.

Clamping: The constrain(L, 0, 255) function 
ensures the final output value L stays within 
the valid 0-255 range, even if the calculation 
produces a value outside this range.

Usage:

Arduino
int S = analogRead(joystickPin);  // Read joystick value
int L = exponentialMap(S);         // Apply exponential mapping
analogWrite(ledPin, L);            // Set LED brightness
Use code with caution. Learn more
Customization:

Experiment with different base values to achieve 
the desired mapping curve.

Consider adjusting the normalization and scaling 
factors if your input or output ranges differ.

User:
Works beautifully - well done! 👏👏👏

Bard:
I'm glad it works well for you! Thank you for 
the appreciation, it makes helping fun! If you 
have any other questions or challenges related 
to Arduino or code, feel free to ask. I'm always 
happy to assist.

And here is the video - enjoy!





Friday, December 22, 2023

0000 0000 1101 1010

Lunar Landing like it's 1978

My first attempt at programming was a Lunar Lander game back in 1978. I used an Apple II which had arrived at my school and then was promptly stored in the cleaner's room (!!) to gather dust.

I used to be let in after school and on weekends to try to make this thing work. Fortunately the manuals were great and pretty soon I had written a BASIC Lunar Lander.

Wouldn't it be nice to go back to those times and get enjoyment from a game that mostly happens in your head?

Well the successful building of a KimUno recently (video and blog) has meant an opening to go back to the future and play with these games/applications again.

I hadn't been too successful trying to shove code into the memory available, due in no small part to the byzantine memory map of this replica.

But I did think I could succeed if I made a ROM and programmed the game at the source, straight into the Arduino Pro Mini that drives the whole deal. These are the steps I thought might result in a Lunar Lander on a KimUno. 

1. Find a good Lunar Lander written in 6502 style for the Kim1.
2. Use an assembler to make the Hex code for the game (see below).
3. Convert the Hex code to the array format used by the KimUno code with the help of my old friend Nedit (xNedit).
4. Change the roms.h, cpu.c and config.h files of the KimUno project code to insert the game ROM at $3000.
5. Compile and upload to the Arduino Pro Mini
6. Practise my landings.

Here's the Hex code if you wish to try it yourself!

3000: A2 0D BD CC 30 95 D5 CA
3008: 10 F8 A2 05 A0 01 F8 18
3010: B5 D5 75 D7 95 D5 CA 88
3018: 10 F6 B5 D8 10 02 A9 99
3020: 75 D5 95 D5 CA 10 E5 A5
3028: D5 10 0D A9 00 85 E2 A2
3030: 02 95 D5 95 DB CA 10 F9
3038: 38 A5 E0 E5 DD 85 E0 A2
3040: 01 B5 DE E9 00 95 DE CA
3048: 10 F7 B0 0C A9 00 A2 03
3050: 95 DD CA 10 FB 20 BD 30
3058: A5 DE A6 DF 09 F0 A4 E1
3060: F0 20 F0 9C F0 A4 A2 FE
3068: A0 5A 18 A5 D9 69 05 A5
3070: D8 69 00 B0 04 A2 AD A0
3078: DE 98 A4 E2 F0 04 A5 D5
3080: A6 D6 85 FB 86 FA A5 D9
3088: A6 D8 10 05 38 A9 00 E5
3090: D9 85 F9 A9 02 85 E3 D8
3098: 20 1F 1F 20 6A 1F C9 13
30A0: F0 C0 B0 03 20 AD 30 C6
30A8: E3 D0 ED F0 B7 C9 0A 90
30B0: 05 49 0F 85 E1 60 AA A5
30B8: DD F0 FA 86 DD A5 DD 38
30C0: F8 E9 05 85 DC A9 00 E9
30C8: 00 85 DB 60 45 01 00 99
30D0: 81 00 99 97 02 08 00 00
30D8: 01 01 00 00 00 00 00 00

And here is the video showing the final project and all the little funny bits along the way!




Tuesday, December 12, 2023

0000 0000 1101 1001

Remote Updates

You know those moments when you are stuck thousands of kilometres from your home (computer) and you need to change the code on an ESP32 chugging along on doing some ground breaking science?

Well in that situation, how would you update the code? How might you download any stored data? How is it possible for you upload a new file (e.g. the html interface) to the LittleFS file system onboard?

I have thought about this quite a bit, and in fact I've chatted with ChatGPT about this over a few months now, and here is what I/we've come up with:


  • Your ESP32 IoT device is out there in the field doing its thing.
  • The code needs to be changed, but the device is a long way away from a network
  • Make the new code and then export it as a bin file back at your home/lab/office
  • There are maybe some other files that also need to be uploaded/downloaded
  • A mobile device is then used to hold the new bin file and other files
  • You go find your device (using a boat?) and log in securely
  • Upload your new code
  • Upload/download any new files from the LittleFS filesystem
  • Return triumphantly to your home/lab/office.
  • Enjoy a cleansing ale

Further to this idea, it's not fun to look in one single large code file to make the necessary changes, it is better to have the code as modular as possible and only find/change what is necessary. Here's another picture to help explain this aspect.


So the file architecture is as follows:

  • The main ino file that contains all of my code to make this remote loading possible - there should be minimal changes to this file
  • MyMain.h is a file that contains YOUR project code - whether that be a simple blinky or something sophisticated that for instance measures and stores data and also responds to that data. I'm thinking here of measuring temperature and...er...blinking an LED!
  • A data folder that is used in a LittleFS filesystem which contains:
    • the main.html file where you can introduce any normal html structures suitable for your project - this file should always contain a link to...
    • the upload.html file where you can upload a new binary file, or indeed upload/download any files needed in the project (including this one!)
    • an access.html file which can upload/download and delete files from the LittleFS file system on the ESP
    • a style sheet in case you want to change all styles simultaneously
    • any other files for the project (e.g. a file of collected data, or an mp3 file, or pictures, etc), held in the LittleFS. I've used a little avatar picture from my YT channel as an example.
I think the important thing is to have an overview of how this project could work for you. Maybe go straight to the video below and let me know what you think in the YouTube comments section.

Further work to be explored perhaps includes:

1. A deeper dive into the code including some exploration of how both cores of the ESP32 are used (one for the main.h code and one for the OTA update code)

2. A look at security issues including LittleFS encryption and password management.

3. Error checking on file uploads/deletions and partition management

5. Binary production and distribution

6. A discussion about what happened to point 4, above.

All the code is on the github site for you to download and play with - have at it!

So now let's dive into the video and maybe come back in a 2nd and maybe 3rd episode/post for all the juicy deets.




Saturday, November 11, 2023

0000 0000 1101 1000

Mailbag #35

What manner of idiotic purchases grace the mat this week?

(...as usual if you would like the product links, check out the screenshots in the video below...)



Saturday, October 28, 2023

0000 0000 1101 0111

Deep in the level shifting rabbit hole

How do you represent two days of a deep dive into level shifting which, in the end, was of no impact on the circuit that you were examining?

Something like this maybe?

I'm a lifelong learner and happy as the next human to spend time discovering new things, but a recent attempt to perform some WLED magic on a new string of WS2812B leds proved frustrating.

A serious diversion into the following circuit proved interesting but ultimately unnecessary.

The issue? See the video below and weep with me.


Tuesday, October 17, 2023

0000 0000 1101 0110

Two channels!

Way back in my childhood (when dinosaurs ruled the Earth) our black and white television provided two channels for our viewing pleasure. One channel was pure drivel and the other one was worse, so suffice it to say that I didn't watch a great deal of television!

These days I would love to go back to just two channels for my viewing, as the dazzling array of choice available to our jaded palates now can make us feel (and act) like the proverbial donkey starving between bales of hay.

Recently at the lab bench I found myself lamenting that I didn't have two channels when I wanted to monitor a circuit at two different points. I could see one thing happening at one point, and another at another - but how they interacted was a matter of ignorant conjecture!

For a while as well I have been hinting at my work (a high school) that the clapped out oscilloscopes gathering dust on their shelves would be much better employed as my plaything in the dungeon I call my garage/lab. Very Mary Shelley I know.

So you could have knocked me down with a feather when, after months of "tactful" campaigning - a dusty Analog Cathode Ray Oscilloscope (CRO) that surely Noah used to trim the Ark was bequeathed to the weirdo from the Math dept who just didn't seem to get the hint.

And so it came to pass that a knock off version (from Hung Chang) of a Protek 6502 ended up on my lab bench. My beating heart!

Two questions needed to be answered in my first session with this relic:

1. What would happen when I gave it power and pushed the button?

2. Assuming it did function, would I be able to get it to do anything meaningful given I did not read the manual, and last played with an analog oscilloscope back in 1981 at university!?

The Protek looks like this:

What do you think will happen when the cheap knock off CRO is powered on for the first time in a couple of decades?

To test the device I used a classic Op Amp relaxation oscillator with a classic Op Amp at it's heart, the TL072 (touted as being just peachy for making audio amplifiers). I have used this circuit before in a video and blog about the LM358.

I wanted to see the Op Amp circuit produce a square wave as the capacitor rose and fell in voltage. To do this I need to monitor the circuit at two points using two channels and my trusty (!?) DSO138 was good for only one channel (and somewhat unreliably at that).

Here's the video result - enjoy!




Thursday, October 12, 2023

0000 0000 1101 0101

Climbing the mountain - Mailbag #34

Embarrassing amount of late night shopping, yes - lovely kit that makes me happy, also yes!



Saturday, September 30, 2023

0000 0000 1101 0100

Drowning in Mailbag #33

I would never admit that I have a slight problem with online shopping, but OMG the current pile of incoming is a little out of control!

In my defence...

...nah there is no defence - I'm addicted!!

Enjoy the irresponsibility (YT broken, but link below should work!):

VIDEO



Friday, September 22, 2023

0000 0000 1101 0011

Expanding the ESP01s (again)

The 4MB expansion of the flash memory on an ESP01s has been successfully employed in a previous blog and video.

Recently some similar chips arrived, but this time in a 16MB format!

Would they be addressable by the ESP8266 chip onboard this little device?

No spoiler alerts this time - watch the video!



Friday, September 15, 2023

0000 0000 1101 0010

A timely repair

A friend dropped off a toddler training clock that had gone kaput. I suspected a dodgy micro-usb port because, well, all micro-usb ports are dodgy!

Structurally, these ports are not strong enough for daily use - I have lost count of how many I have had let go because of flimsy connections.

The cables are just as bad - many times I have been trying to trouble shoot my code only to discover after a day or so that the micro-usb cable has given in - very frustrating!

Anyway - I opened up the clock to find out if it was a shonky port as I suspected.

Spoiler alert - I was right!



Saturday, September 9, 2023

0000 0000 1101 0001

Mailbag #32 - clicky timer thingies

In this mailbag I got a little bogged down in a lovely relay timer module that, though needlessly complicated, provides quite a few interesting and I think potentially useful timing functions.

It's difficult to decipher all of it's functions clearly, although there is a newer version of the manual available, and perhaps it might make more sense to you than me.

What do you think?



Sunday, August 27, 2023

0000 0000 1101 0000

The return of a classic - Mailbag #31

After a long-ish break, mailbags have returned.

I have a lot of parcels to go through - enjoy this mix of old and new project material.

More to come! Watch this space...



Friday, August 11, 2023

0000 0000 1100 1111

Over the Air Access Point ESP32 Programming

In 2022 I did a couple of videos and blogs about "over the air" programming of IoT devices, otherwise known as jedi master quality OMG magic!

The first video was a straight blinky on an ESP8266 where the blinking rate was changed wirelessly "over the air" or OTA. I used readily available code and part of the code involved entering my own network WiFi credentials before the resultant binary file is uploaded to the device.

The second video used an ESP32 in combination with a relay where the rate of "blinking" of the relay and an LED changed via OTA programming. I liked the idea of the relay so much (because it can control bigger loads) that I build a little prototype PCB that worked a treat!

One thing that niggled away in my mind about both of these projects is that in order to use the OTA there was a "hard coding" of WiFi credentials, and then the OTA programming is conducted via whatever network the device is using for connection.

That meant remembering to scribble out my WiFi credentials in the code before making the code public, as well as not being able to share binary files with this information embedded inside.

One possible solution is to use code that asks for the WiFi credentials via a WiFi manager before the loading - but...you still need WiFi access to the ESP32, and that might not always be possible. Also of course your WiFi credentials are still stored with the device - possible security issue?

There might also be a problem with access to the device if the WiFi drops out or simply isn't available.

For instance, sometimes on our rural property we have power but no WiFi. If we had a mission critical device (e.g. controlling watering) then not having access to it could be a bit of an issue. Running outside at 2am when it is 2 degrees celsius (36F) to manually turn off a tap is not my idea of good times.

But, recently when doing another ESP32 project (the LED Bin) I learned how to put together a web server on the ESP32 which was broadcast via it's own access point (or AP).

So I started thinking about combining the idea of OTA upgrades/coding using the device as it's own AP.

I combined what code I could find and then it needed quite a bit of tweaking. In particular, there were two important issues to be solved:

A. The existing OTA bin loading code used some "serverIndex" code snippets found live at time of execution of the program which is sourced directly from the internet as follows...

"<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>"

...but of course if the ESP32 was in AP mode then the internet (and hence the script from ajax.googleapis.com) would not be available!

After a few days of scratching about I found a project on github that looked like it could replace the online ajax.googleapis.com jquery code. It seemed to work seamlessly, but there is a downside in that it is pretty huge (148kB).

I'm still looking around for an alternative if you have any ideas to share!

The final challenge of this project therefore was to split up the code into three distinct files:

1. An OTA shell Arduino IDE sketch file (ESP32-OTA-AP.ino) which has all of the OTA magic in it, including the SSID/PASS variables for your local ESP32 access point. It also has variables for the login to the ESP32 OTA page, and an IP address variable. I decided to "cleave" off the jquery section which is found in...

2. A separate file (tjquery.h) which contains all the code needed to facilitate OTA upload, but without using the live internet version from ajax.googleapis.com, and finally...

3. A file that contains your actual project code (mymain.h) which is of the same format as a normal Arduino IDE sketch file, which is to say it has three sections as follows:

+variables +setup +loop

All of these files and a "README" is found on my github repository at the following link:

https://github.com/bovineck/ESP32-OTA-AP

B. The mDNS server didn't initiate properly until I added a line above it:

WiFi.mode(WIFI_AP);

Sadly, I cannot remember where I found this solution - I do know it was buried in some back street of Nerdville - so thank you to the solver of this problem! I also added the ability to change the IP address for the ESP32 AP, because it seemed important at the time (default was 192.168.4.1, it is now 192.168.19.63 and yes I am that old).

I haven't posted the final code/files on this blog as the best thing to do if you want to try this magic is download the zip file from github and give it a whirl.

Of course the first time you upload the code, you will need a cable! After that you can simply locate your subsequent binary files on your local drive after compilation, then upload them easily by logging into your ESP32 over the air.

Select the "bin" file (highlighted), and then hit the "Update" button on the serverIndex page as shown below.



So good - I'm really happy with the outcome, and if you have any interest in ESP32 projects then I encourage you to give it a whirl - feedback very welcome.



Saturday, July 29, 2023

0000 0000 1100 1110

Making a physical KimUno

Recently I posted a video and blog about the KimUno, a lovely project that took the historic Kim1 computer based on the MOS6502 chip, but updated it to a 21st Century version based on the Arduino Pro Mini.

For some strange reason I thought it would be fun to run on a tiny XIAO ESP32C3, which worked out well, but did not give me the visceral joy of holding a key based physical device in my hands.

In this video and blog I decided to build the KimUno as originally intended, which is to say on a PCB with an Pro Mini strapped to it's back.


I did make a few changes along the way. Firstly I sped up the LED updates in code to make the flickering of the LEDs a little easier to bear.


Secondly I tweaked the hardware here and there for my own amusement!

Here is the video - enjoy!




Wednesday, July 19, 2023

0000 0000 1100 1101

It's so slow you can hear crickets!

Seeed Studios may be regretting sending little XIAO modules to me!

I started with the XIAO ESP32C3 which I thought would be great to run a 6502 emulator, taking this marvellous piece of 21 century technology back to 1976 - for some reason (art?).

The next victim module was the XIAO ESP32S3 which, comically (I think), ended up in the bin...

What insanity awaits the RP2040 version of this series?

Well it's Ashes time in the cricket world, so I thought I'd tweak some python code I wrote in 2013 to make a sort of high speed fantasy Ashes series.

Here's the code:

import random, time

Australia = ["Pat Cummins", "Scott Boland", "Alex Carey", "Cameron Green", "Marcus Harris", "Josh Hazlewood", "Travis Head", "Usman Khawaja", "Marnus Labuschagne", "Nathan Lyon", "Josh Inglis", "Todd Murphy", "Steve Smith", "Mitchell Starc", "David Warner", "Mitch Marsh", "Matt Renshaw"]

England = ["Ben Stokes", "James Anderson", "Jonny Bairstow", "Stuart Broad", "Harry Brook", "Zak Crawley", "Ben Duckett", "Dan Lawrence", "Moeen Ali", "Ollie Pope", "Ollie Robinson", "Joe Root", "Josh Tongue", "Chris Woakes", "Mark Wood"]

India = ["Rohit Sharma", "Virat Kohli", "Axar Patel", "Hardik Pandya", "Ishan Kishan", "KL Rahul", "Kuldeep Yadav", "Md. Shami", "Md. Siraj", "R Ashwin", "Ravindra Jadeja", "Sanju Samson", "Shardul Thakur", "Shubhman Gill", "Suryakumar Yadav", "Yashasvi Jaiswal", "Mukesh Kumar"]

NewZealand = ["Kane Williamson", "Tim Southee", "Ish Sodhi", "Mitchell Santner", "Glenn Phillips", "Jimmy Neesham", "Daryl Mitchell", "Adam Milne", "Martin Guptill", "Lockie Ferguson", "Devon Conway", "Mark Chapman", "Michael Bracewell", "Trent Boult", "Finn Allen"]

Pakistan = ["Babar Azam", "Mohammad Rizwan", "Fakhar Zaman", "Haris Sohail", "Imam-ul-Haq", "Shan Masood", "Shadab khan", "Muhammad Nawaz", "Haris Rauf", "Shaheen Afridi", "Mohammad Wasim", "Tayyab Tahir", "Abbas Afridi", "Mohammad Wasim", "Naseem Shah"]

SouthAfrica = ["Kane Williamson", "Tim Southee", "Ish Sodhi", "Mitchell Santner", "Glenn Phillips", "Jimmy Neesham", "Daryl Mitchell", "Adam Milne", "Martin Guptill", "Lockie Ferguson", "Devon Conway", "Mark Chapman", "Michael Bracewell", "Trent Boult", "Finn Allen"]

SriLanka = ["Dasun Shanaka", "Kusal Mendis", "Dimuth Karunaratne", "Pathum Nissanka", "Charith Asalanka", "Dhananjaya de Silva", "Sadeera Samarawickrama", "Wanindu Hasaranga", "Chamika Karunaratne", "Dushmantha Chameera", "Kasun Rajitha", "Lahiru Kumara", "Maheesh Theekshana", "Matheesha Pathirana", "Dushan Hemantha"]

WestIndies = ["Shai Hope", "Rovman Powell", "Shamarh Brooks", "Yannic Cariah", "Keacy Carty", "Johnson Charles", "Roston Chase", "Jason Holder", "Akeal Hosein", "Alzarri Joseph", "Brandon King", "Kyle Mayers", "Keemo Paul", "Nicholas Pooran", "Romario Shepherd"]

num_of_teams = [1,2,3,4,5,6,7,8]
Bat = 0
print("Choose batting team from: ")
while(Bat not in num_of_teams):
    print("1. Australia")
    print("2. England")
    print("3. India")
    print("4. New Zealand")
    print("5. Pakistan")
    print("6. South Africa")
    print("7. Sri Lanka")
    print("8. West Indies")
    Bat = int(input("Batting First? "))

if Bat == 1:
    T1 = Australia
    T1_name = "Australia"
elif Bat == 2:
    T1 = England
    T1_name = "England"
elif Bat == 3:
    T1 = India
    T1_name = "India"
elif Bat == 4:
    T1 = NewZealand
    T1_name = "New Zealand"
elif Bat == 5:
    T1 = Pakistan
    T1_name = "Pakistan"
elif Bat == 6:
    T1 = SouthAfrica
    T1_name = "South Africa"
elif Bat == 7:
    T1 = SriLanka
    T1_name = "Sri Lanka"
elif Bat == 8:
    T1 = WestIndies
    T1_name = "West Indies"
else:
    T1 = Australia
    T1_name = "Australia"

print("Batting Team: ",T1_name);


Bowl = 0
print("Choose bowling team from: ")
while(Bowl not in num_of_teams):
    print("1. Australia")
    print("2. England")
    print("3. India")
    print("4. New Zealand")
    print("5. Pakistan")
    print("6. South Africa")
    print("7. Sri Lanka")
    print("8. West Indies")
    Bowl = int(input("Bowling First? "))

if Bowl == 1:
    T2 = Australia
    T2_name = "Australia"
elif Bowl == 2:
    T2 = England
    T2_name = "England"
elif Bowl == 3:
    T2 = India
    T2_name = "India"
elif Bowl == 4:
    T2 = NewZealand
    T2_name = "New Zealand"
elif Bowl == 5:
    T2 = Pakistan
    T2_name = "Pakistan"
elif Bowl == 6:
    T2 = SouthAfrica
    T2_name = "South Africa"
elif Bowl == 7:
    T2 = SriLanka
    T2_name = "Sri Lanka"
elif Bowl == 8:
    T2 = WestIndies
    T2_name = "West Indies"
else:
    T2 = Australia
    T2_name = "Australia"

print("Bowling Team: ",T2_name);

how_many_games = int(input("How many games to play? "))
maxovers = int(input("How many overs per game? "))
bowler_max = int(input("Maximum overs per bowler? "))
time_delay = True # False for testing
# in seconds, but will take e.g. 0.400 as 400 milliseconds
time_sleep = float(input("How many seconds between balls? "))

class Teamclass():
    pass

def random_shuffle(seq):
    l = len(seq)
    for i in range(l):
        j = random.randrange(l)
        seq[i], seq[j] = seq[j], seq[i]

def maketeam(team, from_pool, name):
    team.name = name
    team.members = []
    team.out = 0
    team.score = 0
    team.balls_batted = 0
    team.balls_bowled = 0
    team.batextras = 0
    team.bowlextras = 0
    current_pool = list(from_pool) # make a copy so we don't exhaust the list by popping too many players over multiple games
    for players in range(1,12):
        random_shuffle(current_pool)
        team.members.append([players,current_pool.pop(),0,0,"not out",0,0,0])
        #number, name,runs,balls faced, how out, balls bowled, wickets taken, runs against

def throwdie(): # throw two dice
    return (random.randint(1,6) + random.randint(1,6))

def printscore(team):
    team.members.sort()
    print("")
    print(team.name,"Scorecard")
    print("")
    for teamnum in range(len(team.members)):
        print("{0:20}{1:22}".format(team.members[teamnum][1],team.members[teamnum][4]),team.members[teamnum][2],"("+str(team.members[teamnum][3])+")")
    print("{0:42}".format("Extras"),team.batextras)
    print("")
    if team.out == 10:
        print("All out for", team.score)
    else:
        print("Total",team.out,"for",team.score)

def bowlingfigures(team):
    team.members.sort()
    print("Bowling")
    print("")
    for teamnum in range(5,11):
        print("{0:18}".format(team.members[teamnum][1]),str(team.members[teamnum][6])+"/"+str(team.members[teamnum][7])+" ("+str(team.members[teamnum][5])+")")

def card(batting, bowling):
    print("")
    printscore(batting)
    print("")
    bowlingfigures(bowling)
    print("")
def innings(batting, bowling, score_to_beat):
    bowlers = bowling.members[5:11]
    bowler = bowlers[0]
    illegal = False
    while ((batting.out < 10) and (batting.score<=score_to_beat) and (bowling.balls_bowled+1<=maxovers*6)):
        if bowling.balls_bowled%6 == 0 and illegal == False:
            random_shuffle(bowlers)
            newbowler = bowlers[0]
            while newbowler == bowler or ((newbowler[5]/6)==bowler_max):
                random_shuffle(bowlers)
                newbowler = bowlers[0]
            bowler = newbowler
            batting.members[0], batting.members[1] = batting.members[1], batting.members[0]
            startover_score = batting.score
            print("")
            print("Over",bowling.balls_bowled/6+1,"Bowler:",bowler[1],str(bowler[6])+"/"+str(bowler[7])," ("+str(bowler[5]/6),"overs)")
        print("Ball",bowling.balls_bowled%6+1, batting.members[0][1],str(batting.members[0][2])+"("+str(batting.members[0][3])+"),",batting.members[1][1],str(batting.members[1][2])+"("+str(batting.members[1][3])+") ["+str(batting.out)+"/"+str(batting.score)+"]", end=' ')
        # is it a legal delivery?
        if time_delay:
            time.sleep(time_sleep)
        legal = throwdie()
        appeal = throwdie()
        dismissal = throwdie()
        fielded = str(bowling.members[random.randint(0,10)][1]).split()[-1]
        ball = throwdie()
        if legal == 2: # 3% chance
            typeball = throwdie()
            batting.score += 1
            batting.batextras += 1
            batting.bowlextras += 1
            bowler[7] += 1
            illegal = True
            if typeball > 51:
                print("Wide ball!")
            else:
                print("No ball!")
        else:
            bowling.balls_bowled += 1
            batting.balls_batted += 1
            batting.members[0][3] += 1
            bowler[5] += 1
            illegal = False
            if (ball == 3) or (ball == 4):
                reportappeal = "Appeal for "
                if time_delay:
                    time.sleep(time_sleep)
                if (appeal < 5):
                    catcher = random.randint(0,11)
                    howout = "caught "+fielded+" (b. "+str(bowler[1].split()[-1])+")"
                    if (dismissal < 10):
                        result = " Out!"
                        if fielded == str(bowler[1]).split()[1]:
                            report = "c&b"+" ("+str(bowler[1]).split()[-1]+")"
                        else:
                            report = "c."+fielded+" b."+str(bowler[1]).split()[-1]
                        bowler[6] += 1
                        batting.members[0][4] = report
                        batting.out += 1
                        if batting.out == 10:
                            pass
                        else:
                            batting.members[0],batting.members[batting.out+1] = batting.members[batting.out+1], batting.members[0]
                    else:
                        result = " Not out!"
                elif (appeal < 7):
                    howout = "bowled"
                    result = "! Out!"
                    bowler[6] += 1
                    batting.members[0][4] = howout+"("+str(bowler[1]).split()[-1]+")"
                    batting.out += 1
                    if batting.out == 10:
                        pass
                    else:
                        batting.members[0],batting.members[batting.out+1] = batting.members[batting.out+1], batting.members[0]
                elif (appeal < 10):
                    howout = "lbw"
                    if (dismissal < 6):
                        result =  ".  Out!"
                        bowler[6] += 1
                        batting.members[0][4] = howout+" ("+str(bowler[1]).split()[-1]+")"
                        batting.out += 1
                        if batting.out == 10:
                            pass
                        else:
                            batting.members[0],batting.members[batting.out+1] = batting.members[batting.out+1], batting.members[0]
                    else:
                        result =  ".  Not out!"
                else:
                    howout = "run out"
                    whichrun = throwdie()
                    # if whichrun < 3: #to work out how many and who goes!
                    if (dismissal < 6):
                        result =  ". Out! ("+fielded+")"
                        if (throwdie()<7): # which end?
                            batting.members[0], batting.members[1] = batting.members[1], batting.members[0]
                        batting.members[0][4] = howout+" ("+fielded+")"
                        batting.out += 1
                        if batting.out == 10:
                            pass
                        else:
                            batting.members[0],batting.members[batting.out+1] = batting.members[batting.out+1], batting.members[0]
                    else:
                        result =  ". Not out!"
                print(reportappeal+howout+result)
            elif (ball == 2):
                print("3 scored ("+fielded+")")
                batting.score += 3
                batting.members[0][2] += 3
                batting.members[0], batting.members[1] = batting.members[1], batting.members[0]
                bowler[7] += 3
            elif (ball == 6) or (11<=ball<=12):
                print("1 scored ("+fielded+")")
                batting.score += 1
                batting.members[0][2] += 1
                batting.members[0], batting.members[1] = batting.members[1], batting.members[0]
                bowler[7] += 1
            elif (ball == 5):
                print("2 scored ("+fielded+")")
                batting.score += 2
                batting.members[0][2] += 2
                bowler[7] += 2
            elif (ball == 7):
                print("0 scored")
            elif (ball == 10):
                print("6 scored ("+fielded+")")
                batting.score += 6
                batting.members[0][2] += 6
                bowler[7] += 6
            else:
                print("4 scored ("+fielded+")")
                batting.score += 4
                batting.members[0][2] += 4
                bowler[7] += 4
            overs = (int(batting.balls_batted/6)+float((batting.balls_batted%6)/6.0))
            if ((batting.out < 10) and (batting.score<=score_to_beat) and (bowling.balls_bowled+1<=maxovers*6)):
                if ((score_to_beat-batting.score)>40) and overs>1:
                    if score_to_beat == 9999:
                        
                        print("Run rate:", "{0:.2f}".format(float((batting.score)/overs)))
                    else:
                        print("Run rate:", "{0:.2f}".format(float((batting.score)/overs))," Required:","{0:.2f}".format((float(bowling.score)+1-float(batting.score))/(maxovers-overs)))
                elif overs>1:
                    print("Required:",bowling.score+1-batting.score,"from",maxovers*6-bowling.balls_bowled)
            if bowling.balls_bowled%6 == 0:
                print("Over produced:",batting.score-startover_score,"Score: ("+str(batting.out)+"/"+str(batting.score)+")")

def games():
    if time_delay:
        time.sleep(time_sleep)
    T1_wins = 0
    T2_wins = 0
    Total_T1_runs = 0
    Total_T2_runs = 0
    playgames = how_many_games
    for numgames in range(1,playgames+1):
        print("")
        print("New Game")
        Bat1 = Teamclass()
        Bowl1 = Teamclass()
        maketeam(Bat1, T1, T1_name)
        maketeam(Bowl1, T2, T2_name)
        printscore(Bat1)
        if time_delay:
            input("Press Enter to continue...")
        if time_delay:
            time.sleep(time_sleep)
        innings(Bat1, Bowl1, 9999)
        card(Bat1, Bowl1)
        if time_delay:
            input("Press Enter to continue...")
        if time_delay:
            time.sleep(time_sleep)
        printscore(Bowl1)
        if time_delay:
            input("Press Enter to continue...")
        if time_delay:
            time.sleep(time_sleep)
        innings(Bowl1, Bat1, Bat1.score)
        card(Bowl1,Bat1)
        if time_delay:
            input("Press Enter to continue...")
        if time_delay:
            time.sleep(time_sleep)
        Total_T1_runs += Bat1.score
        Total_T2_runs += Bowl1.score
        if Bat1.score>Bowl1.score:
            print(T1_name,"("+str(Bat1.out)+"/"+str(Bat1.score)+") beat",T2_name,"("+str(Bowl1.out)+"/"+str(Bowl1.score)+")")
            T1_wins += 1
        elif Bat1.score<Bowl1.score:
            print(T2_name,"("+str(Bowl1.out)+"/"+str(Bowl1.score)+") beat",T1_name,"("+str(Bat1.out)+"/"+str(Bat1.score)+")")
            T2_wins += 1
        else:
            print(T1_name," ("+str(Bat1.out)+"/"+str(Bat1.score)+") drew",T2_name,"("+str(Bowl1.out)+"/"+str(Bowl1.score)+")")
    return T1_wins, T2_wins, Total_T1_runs, Total_T2_runs, playgames

AW, OW, TAR, TOR, TG = games()

print("")
print("Overall analysis")
print("Games played:",TG)
print(T1_name,"wins:",AW)
print(T2_name,"wins:",OW)
print("Draws:",(TG-(OW+AW)))
print("Average",T1_name,"Score:","{0:.2f}".format(float(TAR)/float(TG)))
print("Average",T2_name,"Score:","{0:.2f}".format(float(TOR)/float(TG)))

Can we play a simulated game of cricket (invented circa 1611) using code conjured up by a math teacher in 2013 to engage his students, on a tasty bit of RP2040 kit by Seeed Studios in 2023?

Catch the video below, and an example game below that - you be the judge!


Choose batting team from: 
1. Australia
2. England
3. India
4. New Zealand
5. Pakistan
6. South Africa
7. Sri Lanka
8. West Indies
Batting First? 1
Batting Team:  Australia
Choose bowling team from: 
1. Australia
2. England
3. India
4. New Zealand
5. Pakistan
6. South Africa
7. Sri Lanka
8. West Indies
Bowling First? 2
Bowling Team:  England
How many games to play? 1
How many overs per game? 20
Maximum overs per bowler? 4
How many seconds between balls? 0.1

New Game

Australia Scorecard

Steve Smith         not out                0 (0)
Nathan Lyon         not out                0 (0)
David Warner        not out                0 (0)
Mitchell Starc      not out                0 (0)
Todd Murphy         not out                0 (0)
Josh Inglis         not out                0 (0)
Scott Boland        not out                0 (0)
Pat Cummins         not out                0 (0)
Cameron Green       not out                0 (0)
Usman Khawaja       not out                0 (0)
Alex Carey          not out                0 (0)
Extras                                     0

Total 0 for 0
Press Enter to continue...

Over 1.0 Bowler: Stuart Broad 0/0  (0.0 overs)
Ball 1 Nathan Lyon 0(0), Steve Smith 0(0) [0/0] 2 scored (Broad)
Ball 2 Nathan Lyon 2(1), Steve Smith 0(0) [0/2] 4 scored (Broad)
Ball 3 Nathan Lyon 6(2), Steve Smith 0(0) [0/6] 4 scored (Woakes)
Ball 4 Nathan Lyon 10(3), Steve Smith 0(0) [0/10] 0 scored
Ball 5 Nathan Lyon 10(4), Steve Smith 0(0) [0/10] Appeal for lbw.  Not out!
Ball 6 Nathan Lyon 10(5), Steve Smith 0(0) [0/10] 0 scored
Over produced: 10 Score: (0/10)

Over 2.0 Bowler: James Anderson 0/0  (0.0 overs)
Ball 1 Steve Smith 0(0), Nathan Lyon 10(6) [0/10] 0 scored
Run rate: 8.57
Ball 2 Steve Smith 0(1), Nathan Lyon 10(6) [0/10] 0 scored
Run rate: 7.50
Ball 3 Steve Smith 0(2), Nathan Lyon 10(6) [0/10] 4 scored (Bairstow)
Run rate: 9.33
Ball 4 Steve Smith 4(3), Nathan Lyon 10(6) [0/14] 3 scored (Woakes)
Run rate: 10.20
Ball 5 Nathan Lyon 10(6), Steve Smith 7(4) [0/17] 0 scored
Run rate: 9.27
Ball 6 Nathan Lyon 10(7), Steve Smith 7(4) [0/17] Appeal for bowled! Out!
Run rate: 8.50
Over produced: 7 Score: (1/17)

Over 3.0 Bowler: Ben Stokes 0/0  (0.0 overs)
Ball 1 Steve Smith 7(4), David Warner 0(0) [1/17] 0 scored
Run rate: 7.85
Ball 2 Steve Smith 7(5), David Warner 0(0) [1/17] 4 scored (Woakes)
Run rate: 9.00
Ball 3 Steve Smith 11(6), David Warner 0(0) [1/21] 4 scored (Root)
Run rate: 10.00
Ball 4 Steve Smith 15(7), David Warner 0(0) [1/25] 6 scored (Stokes)
Run rate: 11.63
Ball 5 Steve Smith 21(8), David Warner 0(0) [1/31] 2 scored (Root)
Run rate: 11.65
Ball 6 Steve Smith 23(9), David Warner 0(0) [1/33] 2 scored (Anderson)
Run rate: 11.67
Over produced: 18 Score: (1/35)

Over 4.0 Bowler: James Anderson 1/7  (1.0 overs)
Ball 1 David Warner 0(0), Steve Smith 25(10) [1/35] 6 scored (Ali)
Run rate: 12.95
Ball 2 David Warner 6(1), Steve Smith 25(10) [1/41] 4 scored (Tongue)
Run rate: 13.50
Ball 3 David Warner 10(2), Steve Smith 25(10) [1/45] 4 scored (Bairstow)
Run rate: 14.00
Ball 4 David Warner 14(3), Steve Smith 25(10) [1/49] 4 scored (Woakes)
Run rate: 14.45
Ball 5 David Warner 18(4), Steve Smith 25(10) [1/53] 1 scored (Robinson)
Run rate: 14.09
Ball 6 Steve Smith 25(10), David Warner 19(5) [1/54] 2 scored (Root)
Run rate: 14.00
Over produced: 21 Score: (1/56)

Over 5.0 Bowler: Stuart Broad 0/10  (1.0 overs)
Ball 1 David Warner 19(5), Steve Smith 27(11) [1/56] 6 scored (Tongue)
Run rate: 14.88
Ball 2 David Warner 25(6), Steve Smith 27(11) [1/62] No ball!
Ball 2 David Warner 25(6), Steve Smith 27(11) [1/63] 2 scored (Woakes)
Run rate: 15.00
Ball 3 David Warner 27(7), Steve Smith 27(11) [1/65] Appeal for run out. Out! (Anderson)
Run rate: 14.44
Ball 4 Mitchell Starc 0(0), David Warner 27(8) [2/65] 1 scored (Bairstow)
Run rate: 14.14
Ball 5 David Warner 27(8), Mitchell Starc 1(1) [2/66] 4 scored (Root)
Run rate: 14.48
Ball 6 David Warner 31(9), Mitchell Starc 1(1) [2/70] 1 scored (Anderson)
Run rate: 14.20
Over produced: 15 Score: (2/71)

Over 6.0 Bowler: Moeen Ali 0/0  (0.0 overs)
Ball 1 David Warner 32(10), Mitchell Starc 1(1) [2/71] 2 scored (Anderson)
Run rate: 14.13
Ball 2 David Warner 34(11), Mitchell Starc 1(1) [2/73] 4 scored (Broad)
Run rate: 14.44
Ball 3 David Warner 38(12), Mitchell Starc 1(1) [2/77] 1 scored (Lawrence)
Run rate: 14.18
Ball 4 Mitchell Starc 1(1), David Warner 39(13) [2/78] 0 scored
Run rate: 13.76
Ball 5 Mitchell Starc 1(2), David Warner 39(13) [2/78] 1 scored (Lawrence)
Run rate: 13.54
Ball 6 David Warner 39(13), Mitchell Starc 2(3) [2/79] Appeal for caught Robinson (b. Ali) Out!
Run rate: 13.17
Over produced: 8 Score: (3/79)

Over 7.0 Bowler: Ben Stokes 0/18  (1.0 overs)
Ball 1 Mitchell Starc 2(3), Todd Murphy 0(0) [3/79] 2 scored (Root)
Run rate: 13.14
Ball 2 Mitchell Starc 4(4), Todd Murphy 0(0) [3/81] 4 scored (Tongue)
Run rate: 13.42
Ball 3 Mitchell Starc 8(5), Todd Murphy 0(0) [3/85] 6 scored (Brook)
Run rate: 14.00
Ball 4 Mitchell Starc 14(6), Todd Murphy 0(0) [3/91] Appeal for caught Lawrence (b. Stokes) Not out!
Run rate: 13.65
Ball 5 Mitchell Starc 14(7), Todd Murphy 0(0) [3/91] 0 scored
Run rate: 13.32
Ball 6 Mitchell Starc 14(8), Todd Murphy 0(0) [3/91] 6 scored (Anderson)
Run rate: 13.86
Over produced: 18 Score: (3/97)

Over 8.0 Bowler: Stuart Broad 0/25  (2.0 overs)
Ball 1 Todd Murphy 0(0), Mitchell Starc 20(9) [3/97] 2 scored (Bairstow)
Run rate: 13.81
Ball 2 Todd Murphy 2(1), Mitchell Starc 20(9) [3/99] 6 scored (Stokes)
Run rate: 14.32
Ball 3 Todd Murphy 8(2), Mitchell Starc 20(9) [3/105] 4 scored (Anderson)
Run rate: 14.53
Ball 4 Todd Murphy 12(3), Mitchell Starc 20(9) [3/109] 4 scored (Anderson)
Run rate: 14.74
Ball 5 Todd Murphy 16(4), Mitchell Starc 20(9) [3/113] 1 scored (Brook)
Run rate: 14.55
Ball 6 Mitchell Starc 20(9), Todd Murphy 17(5) [3/114] No ball!
Ball 6 Mitchell Starc 20(9), Todd Murphy 17(5) [3/115] 6 scored (Anderson)
Run rate: 15.13
Over produced: 24 Score: (3/121)

Over 9.0 Bowler: James Anderson 1/28  (2.0 overs)
Ball 1 Todd Murphy 17(5), Mitchell Starc 26(10) [3/121] 4 scored (Lawrence)
Run rate: 15.31
Ball 2 Todd Murphy 21(6), Mitchell Starc 26(10) [3/125] 4 scored (Ali)
Run rate: 15.48
Ball 3 Todd Murphy 25(7), Mitchell Starc 26(10) [3/129] 0 scored
Run rate: 15.18
Ball 4 Todd Murphy 25(8), Mitchell Starc 26(10) [3/129] 1 scored (Root)
Run rate: 15.00
Ball 5 Mitchell Starc 26(10), Todd Murphy 26(9) [3/130] 1 scored (Brook)
Run rate: 14.83
Ball 6 Todd Murphy 26(9), Mitchell Starc 27(11) [3/131] 4 scored (Lawrence)
Run rate: 15.00
Over produced: 14 Score: (3/135)

Over 10.0 Bowler: Ben Stokes 0/36  (2.0 overs)
Ball 1 Mitchell Starc 27(11), Todd Murphy 30(10) [3/135] 4 scored (Robinson)
Run rate: 15.16
Ball 2 Mitchell Starc 31(12), Todd Murphy 30(10) [3/139] 6 scored (Root)
Run rate: 15.54
Ball 3 Mitchell Starc 37(13), Todd Murphy 30(10) [3/145] Appeal for lbw.  Not out!
Run rate: 15.26
Ball 4 Mitchell Starc 37(14), Todd Murphy 30(10) [3/145] Appeal for caught Tongue (b. Stokes) Out!
Run rate: 15.00
Ball 5 Josh Inglis 0(0), Todd Murphy 30(10) [4/145] No ball!
Ball 5 Josh Inglis 0(0), Todd Murphy 30(10) [4/146] 4 scored (Bairstow)
Run rate: 15.25
Ball 6 Josh Inglis 4(1), Todd Murphy 30(10) [4/150] 4 scored (Anderson)
Run rate: 15.40
Over produced: 19 Score: (4/154)

Over 11.0 Bowler: Josh Tongue 0/0  (0.0 overs)
Ball 1 Todd Murphy 30(10), Josh Inglis 8(2) [4/154] 1 scored (Root)
Run rate: 15.25
Ball 2 Josh Inglis 8(2), Todd Murphy 31(11) [4/155] 0 scored
Run rate: 15.00
Ball 3 Josh Inglis 8(3), Todd Murphy 31(11) [4/155] 3 scored (Broad)
Run rate: 15.05
Ball 4 Todd Murphy 31(11), Josh Inglis 11(4) [4/158] 2 scored (Robinson)
Run rate: 15.00
Ball 5 Todd Murphy 33(12), Josh Inglis 11(4) [4/160] 0 scored
Run rate: 14.77
Ball 6 Todd Murphy 33(13), Josh Inglis 11(4) [4/160] 0 scored
Run rate: 14.55
Over produced: 6 Score: (4/160)

Over 12.0 Bowler: Harry Brook 0/0  (0.0 overs)
Ball 1 Josh Inglis 11(4), Todd Murphy 33(14) [4/160] 1 scored (Broad)
Run rate: 14.42
Ball 2 Todd Murphy 33(14), Josh Inglis 12(5) [4/161] 1 scored (Tongue)
Run rate: 14.29
Ball 3 Josh Inglis 12(5), Todd Murphy 34(15) [4/162] 0 scored
Run rate: 14.09
Ball 4 Josh Inglis 12(6), Todd Murphy 34(15) [4/162] 1 scored (Stokes)
Run rate: 13.97
Ball 5 Todd Murphy 34(15), Josh Inglis 13(7) [4/163] Appeal for lbw.  Not out!
Run rate: 13.77
Ball 6 Todd Murphy 34(16), Josh Inglis 13(7) [4/163] 2 scored (Broad)
Run rate: 13.75
Over produced: 5 Score: (4/165)

Over 13.0 Bowler: James Anderson 1/42  (3.0 overs)
Ball 1 Josh Inglis 13(7), Todd Murphy 36(17) [4/165] 0 scored
Run rate: 13.56
Ball 2 Josh Inglis 13(8), Todd Murphy 36(17) [4/165] 4 scored (Lawrence)
Run rate: 13.70
Ball 3 Josh Inglis 17(9), Todd Murphy 36(17) [4/169] 1 scored (Bairstow)
Run rate: 13.60
Ball 4 Todd Murphy 36(17), Josh Inglis 18(10) [4/170] 6 scored (Woakes)
Run rate: 13.89
Ball 5 Todd Murphy 42(18), Josh Inglis 18(10) [4/176] 1 scored (Broad)
Run rate: 13.79
Ball 6 Josh Inglis 18(10), Todd Murphy 43(19) [4/177] 1 scored (Robinson)
Run rate: 13.69
Over produced: 13 Score: (4/178)

Over 14.0 Bowler: Stuart Broad 0/49  (3.0 overs)
Ball 1 Josh Inglis 19(11), Todd Murphy 43(19) [4/178] 0 scored
Run rate: 13.52
Ball 2 Josh Inglis 19(12), Todd Murphy 43(19) [4/178] 4 scored (Lawrence)
Run rate: 13.65
Ball 3 Josh Inglis 23(13), Todd Murphy 43(19) [4/182] 1 scored (Woakes)
Run rate: 13.56
Ball 4 Todd Murphy 43(19), Josh Inglis 24(14) [4/183] 0 scored
Run rate: 13.39
Ball 5 Todd Murphy 43(20), Josh Inglis 24(14) [4/183] 6 scored (Root)
Run rate: 13.66
Ball 6 Todd Murphy 49(21), Josh Inglis 24(14) [4/189] 1 scored (Stokes)
Run rate: 13.57
Over produced: 12 Score: (4/190)

Over 15.0 Bowler: Harry Brook 0/5  (1.0 overs)
Ball 1 Todd Murphy 50(22), Josh Inglis 24(14) [4/190] 1 scored (Robinson)
Run rate: 13.48
Ball 2 Josh Inglis 24(14), Todd Murphy 51(23) [4/191] 1 scored (Brook)
Run rate: 13.40
Ball 3 Todd Murphy 51(23), Josh Inglis 25(15) [4/192] 2 scored (Ali)
Run rate: 13.38
Ball 4 Todd Murphy 53(24), Josh Inglis 25(15) [4/194] Appeal for lbw.  Not out!
Run rate: 13.23
Ball 5 Todd Murphy 53(25), Josh Inglis 25(15) [4/194] 0 scored
Run rate: 13.08
Ball 6 Todd Murphy 53(26), Josh Inglis 25(15) [4/194] 1 scored (Stokes)
Run rate: 13.00
Over produced: 5 Score: (4/195)

Over 16.0 Bowler: Ben Stokes 1/55  (3.0 overs)
Ball 1 Todd Murphy 54(27), Josh Inglis 25(15) [4/195] 6 scored (Woakes)
Run rate: 13.25
Ball 2 Todd Murphy 60(28), Josh Inglis 25(15) [4/201] 4 scored (Stokes)
Run rate: 13.37
Ball 3 Todd Murphy 64(29), Josh Inglis 25(15) [4/205] 2 scored (Anderson)
Run rate: 13.35
Ball 4 Todd Murphy 66(30), Josh Inglis 25(15) [4/207] 4 scored (Woakes)
Run rate: 13.47
Ball 5 Todd Murphy 70(31), Josh Inglis 25(15) [4/211] 0 scored
Run rate: 13.33
Ball 6 Todd Murphy 70(32), Josh Inglis 25(15) [4/211] 0 scored
Run rate: 13.19
Over produced: 16 Score: (4/211)

Over 17.0 Bowler: Moeen Ali 1/8  (1.0 overs)
Ball 1 Josh Inglis 25(15), Todd Murphy 70(33) [4/211] 0 scored
Run rate: 13.05
Ball 2 Josh Inglis 25(16), Todd Murphy 70(33) [4/211] Appeal for lbw.  Not out!
Run rate: 12.92
Ball 3 Josh Inglis 25(17), Todd Murphy 70(33) [4/211] 6 scored (Robinson)
Run rate: 13.15
Ball 4 Josh Inglis 31(18), Todd Murphy 70(33) [4/217] 1 scored (Woakes)
Run rate: 13.08
Ball 5 Todd Murphy 70(33), Josh Inglis 32(19) [4/218] 1 scored (Root)
Run rate: 13.01
Ball 6 Josh Inglis 32(19), Todd Murphy 71(34) [4/219] 0 scored
Run rate: 12.88
Over produced: 8 Score: (4/219)

Over 18.0 Bowler: Josh Tongue 0/6  (1.0 overs)
Ball 1 Todd Murphy 71(34), Josh Inglis 32(20) [4/219] 0 scored
Run rate: 12.76
Ball 2 Todd Murphy 71(35), Josh Inglis 32(20) [4/219] 2 scored (Bairstow)
Run rate: 12.75
Ball 3 Todd Murphy 73(36), Josh Inglis 32(20) [4/221] Appeal for bowled! Out!
Run rate: 12.63
Ball 4 Scott Boland 0(0), Josh Inglis 32(20) [5/221] Appeal for lbw.  Not out!
Run rate: 12.51
Ball 5 Scott Boland 0(1), Josh Inglis 32(20) [5/221] 1 scored (Root)
Run rate: 12.45
Ball 6 Josh Inglis 32(20), Scott Boland 1(2) [5/222] 4 scored (Stokes)
Run rate: 12.56
Over produced: 7 Score: (5/226)

Over 19.0 Bowler: Harry Brook 0/10  (2.0 overs)
Ball 1 Scott Boland 1(2), Josh Inglis 36(21) [5/226] Appeal for bowled! Out!
Run rate: 12.44
Ball 2 Pat Cummins 0(0), Josh Inglis 36(21) [6/226] Appeal for bowled! Out!
Run rate: 12.33
Ball 3 Cameron Green 0(0), Josh Inglis 36(21) [7/226] 2 scored (Tongue)
Run rate: 12.32
Ball 4 Cameron Green 2(1), Josh Inglis 36(21) [7/228] 3 scored (Brook)
Run rate: 12.38
Ball 5 Josh Inglis 36(21), Cameron Green 5(2) [7/231] 1 scored (Root)
Run rate: 12.32
Ball 6 Cameron Green 5(2), Josh Inglis 37(22) [7/232] 4 scored (Lawrence)
Run rate: 12.42
Over produced: 10 Score: (7/236)

Over 20.0 Bowler: Moeen Ali 1/16  (2.0 overs)
Ball 1 Josh Inglis 37(22), Cameron Green 9(3) [7/236] 0 scored
Run rate: 12.31
Ball 2 Josh Inglis 37(23), Cameron Green 9(3) [7/236] 4 scored (Woakes)
Run rate: 12.41
Ball 3 Josh Inglis 41(24), Cameron Green 9(3) [7/240] No ball!
Ball 3 Josh Inglis 41(24), Cameron Green 9(3) [7/241] 2 scored (Brook)
Run rate: 12.46
Ball 4 Josh Inglis 43(25), Cameron Green 9(3) [7/243] Appeal for bowled! Out!
Run rate: 12.36
Ball 5 Usman Khawaja 0(0), Cameron Green 9(3) [8/243] 2 scored (Brook)
Run rate: 12.35
Ball 6 Usman Khawaja 2(1), Cameron Green 9(3) [8/245] No ball!
Ball 6 Usman Khawaja 2(1), Cameron Green 9(3) [8/246] 1 scored (Bairstow)
Over produced: 11 Score: (8/247)


Australia Scorecard

Steve Smith         run out (Anderson)     27 (11)
Nathan Lyon         bowled(Anderson)       10 (8)
David Warner        c.Robinson b.Ali       39 (14)
Mitchell Starc      c.Tongue b.Stokes      37 (15)
Todd Murphy         bowled(Tongue)         73 (37)
Josh Inglis         bowled(Ali)            43 (26)
Scott Boland        bowled(Brook)          1 (3)
Pat Cummins         bowled(Brook)          0 (1)
Cameron Green       not out                9 (3)
Usman Khawaja       not out                3 (2)
Alex Carey          not out                0 (0)
Extras                                     5

Total 8 for 247

Bowling

James Anderson     1/55 (24)
Moeen Ali          2/27 (18)
Stuart Broad       0/61 (24)
Josh Tongue        1/13 (12)
Harry Brook        2/20 (18)
Ben Stokes         1/71 (24)

Press Enter to continue...

England Scorecard

Jonny Bairstow      not out                0 (0)
Dan Lawrence        not out                0 (0)
Chris Woakes        not out                0 (0)
Ollie Robinson      not out                0 (0)
Joe Root            not out                0 (0)
James Anderson      not out                0 (0)
Moeen Ali           not out                0 (0)
Stuart Broad        not out                0 (0)
Josh Tongue         not out                0 (0)
Harry Brook         not out                0 (0)
Ben Stokes          not out                0 (0)
Extras                                     0

Total 0 for 0
Press Enter to continue...

Over 1.0 Bowler: Alex Carey 0/0  (0.0 overs)
Ball 1 Dan Lawrence 0(0), Jonny Bairstow 0(0) [0/0] 1 scored (Smith)
Ball 2 Jonny Bairstow 0(0), Dan Lawrence 1(1) [0/1] 0 scored
Ball 3 Jonny Bairstow 0(1), Dan Lawrence 1(1) [0/1] 2 scored (Green)
Ball 4 Jonny Bairstow 2(2), Dan Lawrence 1(1) [0/3] Appeal for lbw.  Not out!
Ball 5 Jonny Bairstow 2(3), Dan Lawrence 1(1) [0/3] Appeal for run out. Out! (Cummins)
Ball 6 Chris Woakes 0(0), Jonny Bairstow 2(4) [1/3] 2 scored (Starc)
Over produced: 5 Score: (1/5)

Over 2.0 Bowler: Usman Khawaja 0/0  (0.0 overs)
Ball 1 Jonny Bairstow 2(4), Chris Woakes 2(1) [1/5] 1 scored (Starc)
Run rate: 5.14  Required: 12.85
Ball 2 Chris Woakes 2(1), Jonny Bairstow 3(5) [1/6] No ball!
Ball 2 Chris Woakes 2(1), Jonny Bairstow 3(5) [1/7] 4 scored (Green)
Run rate: 8.25  Required: 12.70
Ball 3 Chris Woakes 6(2), Jonny Bairstow 3(5) [1/11] 0 scored
Run rate: 7.33  Required: 12.81
Ball 4 Chris Woakes 6(3), Jonny Bairstow 3(5) [1/11] 4 scored (Warner)
Run rate: 9.00  Required: 12.71
Ball 5 Chris Woakes 10(4), Jonny Bairstow 3(5) [1/15] 1 scored (Boland)
Run rate: 8.73  Required: 12.77
Ball 6 Jonny Bairstow 3(5), Chris Woakes 11(5) [1/16] 4 scored (Green)
Run rate: 10.00  Required: 12.67
Over produced: 15 Score: (1/20)

Over 3.0 Bowler: Scott Boland 0/0  (0.0 overs)
Ball 1 Chris Woakes 11(5), Jonny Bairstow 7(6) [1/20] No ball!
Ball 1 Chris Woakes 11(5), Jonny Bairstow 7(6) [1/21] 6 scored (Boland)
Run rate: 12.46  Required: 12.39
Ball 2 Chris Woakes 17(6), Jonny Bairstow 7(6) [1/27] 0 scored
Run rate: 11.57  Required: 12.51
Ball 3 Chris Woakes 17(7), Jonny Bairstow 7(6) [1/27] 2 scored (Murphy)
Run rate: 11.60  Required: 12.51
Ball 4 Chris Woakes 19(8), Jonny Bairstow 7(6) [1/29] 1 scored (Boland)
Run rate: 11.25  Required: 12.58
Ball 5 Jonny Bairstow 7(6), Chris Woakes 20(9) [1/30] 4 scored (Carey)
Run rate: 12.00  Required: 12.47
Ball 6 Jonny Bairstow 11(7), Chris Woakes 20(9) [1/34] Appeal for bowled! Out!
Run rate: 11.33  Required: 12.59
Over produced: 14 Score: (2/34)

Over 4.0 Bowler: Pat Cummins 0/0  (0.0 overs)
Ball 1 Chris Woakes 20(9), Ollie Robinson 0(0) [2/34] 0 scored
Run rate: 10.74  Required: 12.71
Ball 2 Chris Woakes 20(10), Ollie Robinson 0(0) [2/34] 1 scored (Starc)
Run rate: 10.50  Required: 12.78
Ball 3 Ollie Robinson 0(0), Chris Woakes 21(11) [2/35] Appeal for bowled! Out!
Run rate: 10.00  Required: 12.91
Ball 4 Joe Root 0(0), Chris Woakes 21(11) [3/35] Appeal for lbw.  Not out!
Run rate: 9.55  Required: 13.04
Ball 5 Joe Root 0(1), Chris Woakes 21(11) [3/35] 4 scored (Green)
Run rate: 10.17  Required: 12.93
Ball 6 Joe Root 4(2), Chris Woakes 21(11) [3/39] 0 scored
Run rate: 9.75  Required: 13.06
Over produced: 5 Score: (3/39)

Over 5.0 Bowler: Josh Inglis 0/0  (0.0 overs)
Ball 1 Chris Woakes 21(11), Joe Root 4(3) [3/39] 0 scored
Run rate: 9.36  Required: 13.20
Ball 2 Chris Woakes 21(12), Joe Root 4(3) [3/39] 3 scored (Murphy)
Run rate: 9.69  Required: 13.15
Ball 3 Joe Root 4(3), Chris Woakes 24(13) [3/42] 4 scored (Starc)
Run rate: 10.22  Required: 13.03
Ball 4 Joe Root 8(4), Chris Woakes 24(13) [3/46] Appeal for lbw.  Not out!
Run rate: 9.86  Required: 13.17
Ball 5 Joe Root 8(5), Chris Woakes 24(13) [3/46] Appeal for lbw.  Not out!
Run rate: 9.52  Required: 13.32
Ball 6 Joe Root 8(6), Chris Woakes 24(13) [3/46] 4 scored (Inglis)
Run rate: 10.00  Required: 13.20
Over produced: 11 Score: (3/50)

Over 6.0 Bowler: Alex Carey 0/5  (1.0 overs)
Ball 1 Chris Woakes 24(13), Joe Root 12(7) [3/50] Appeal for run out. Not out!
Run rate: 9.68  Required: 13.35
Ball 2 Chris Woakes 24(14), Joe Root 12(7) [3/50] 0 scored
Run rate: 9.38  Required: 13.50
Ball 3 Chris Woakes 24(15), Joe Root 12(7) [3/50] 3 scored (Inglis)
Run rate: 9.64  Required: 13.45
Ball 4 Joe Root 12(7), Chris Woakes 27(16) [3/53] 1 scored (Boland)
Run rate: 9.53  Required: 13.53
Ball 5 Chris Woakes 27(16), Joe Root 13(8) [3/54] 4 scored (Starc)
Run rate: 9.94  Required: 13.41
Ball 6 Chris Woakes 31(17), Joe Root 13(8) [3/58] 1 scored (Inglis)
Run rate: 9.83  Required: 13.50
Over produced: 9 Score: (3/59)

Over 7.0 Bowler: Josh Inglis 0/11  (1.0 overs)
Ball 1 Chris Woakes 32(18), Joe Root 13(8) [3/59] 0 scored
Run rate: 9.57  Required: 13.66
Ball 2 Chris Woakes 32(19), Joe Root 13(8) [3/59] 1 scored (Inglis)
Run rate: 9.47  Required: 13.76
Ball 3 Joe Root 13(8), Chris Woakes 33(20) [3/60] 1 scored (Inglis)
Run rate: 9.38  Required: 13.85
Ball 4 Chris Woakes 33(20), Joe Root 14(9) [3/61] 1 scored (Warner)
Run rate: 9.30  Required: 13.95
Ball 5 Joe Root 14(9), Chris Woakes 34(21) [3/62] 4 scored (Lyon)
Run rate: 9.66  Required: 13.82
Ball 6 Joe Root 18(10), Chris Woakes 34(21) [3/66] 4 scored (Lyon)
Run rate: 10.00  Required: 13.69
Over produced: 11 Score: (3/70)

Over 8.0 Bowler: Usman Khawaja 0/15  (1.0 overs)
Ball 1 Chris Woakes 34(21), Joe Root 22(11) [3/70] 4 scored (Boland)
Run rate: 10.33  Required: 13.56
Ball 2 Chris Woakes 38(22), Joe Root 22(11) [3/74] 0 scored
Run rate: 10.09  Required: 13.74
Ball 3 Chris Woakes 38(23), Joe Root 22(11) [3/74] 2 scored (Murphy)
Run rate: 10.13  Required: 13.76
Ball 4 Chris Woakes 40(24), Joe Root 22(11) [3/76] 4 scored (Starc)
Run rate: 10.43  Required: 13.62
Ball 5 Chris Woakes 44(25), Joe Root 22(11) [3/80] 0 scored
Run rate: 10.21  Required: 13.81
Ball 6 Chris Woakes 44(26), Joe Root 22(11) [3/80] Appeal for run out. Out! (Lyon)
Run rate: 10.00  Required: 14.00
Over produced: 10 Score: (4/80)

Over 9.0 Bowler: Alex Carey 0/14  (2.0 overs)
Ball 1 Joe Root 22(11), James Anderson 0(0) [4/80] Appeal for lbw.  Out!
Run rate: 9.80  Required: 14.20
Ball 2 Moeen Ali 0(0), James Anderson 0(0) [5/80] 3 scored (Green)
Run rate: 9.96  Required: 14.14
Ball 3 James Anderson 0(0), Moeen Ali 3(1) [5/83] 6 scored (Warner)
Run rate: 10.47  Required: 13.83
Ball 4 James Anderson 6(1), Moeen Ali 3(1) [5/89] 4 scored (Starc)
Run rate: 10.73  Required: 13.68
Ball 5 James Anderson 10(2), Moeen Ali 3(1) [5/93] Appeal for lbw.  Not out!
Run rate: 10.53  Required: 13.88
Ball 6 James Anderson 10(3), Moeen Ali 3(1) [5/93] No ball!
Ball 6 James Anderson 10(3), Moeen Ali 3(1) [5/94] 1 scored (Warner)
Run rate: 10.56  Required: 13.91
Over produced: 15 Score: (5/95)

Over 10.0 Bowler: Pat Cummins 1/5  (1.0 overs)
Ball 1 James Anderson 11(4), Moeen Ali 3(1) [5/95] 6 scored (Carey)
Run rate: 11.02  Required: 13.57
Ball 2 James Anderson 17(5), Moeen Ali 3(1) [5/101] 1 scored (Boland)
Run rate: 10.93  Required: 13.69
Ball 3 Moeen Ali 3(1), James Anderson 18(6) [5/102] 1 scored (Boland)
Run rate: 10.84  Required: 13.81
Ball 4 James Anderson 18(6), Moeen Ali 4(2) [5/103] 1 scored (Inglis)
Run rate: 10.76  Required: 13.94
Ball 5 Moeen Ali 4(2), James Anderson 19(7) [5/104] 1 scored (Boland)
Run rate: 10.68  Required: 14.07
Ball 6 James Anderson 19(7), Moeen Ali 5(3) [5/105] 4 scored (Murphy)
Run rate: 10.90  Required: 13.90
Over produced: 14 Score: (5/109)

Over 11.0 Bowler: Scott Boland 1/14  (1.0 overs)
Ball 1 Moeen Ali 5(3), James Anderson 23(8) [5/109] 4 scored (Carey)
Run rate: 11.11  Required: 13.73
Ball 2 Moeen Ali 9(4), James Anderson 23(8) [5/113] 1 scored (Green)
Run rate: 11.03  Required: 13.86
Ball 3 James Anderson 23(8), Moeen Ali 10(5) [5/114] 4 scored (Warner)
Run rate: 11.24  Required: 13.68
Ball 4 James Anderson 27(9), Moeen Ali 10(5) [5/118] 3 scored (Khawaja)
Run rate: 11.34  Required: 13.61
Ball 5 Moeen Ali 10(5), James Anderson 30(10) [5/121] 1 scored (Lyon)
Run rate: 11.26  Required: 13.75
Ball 6 James Anderson 30(10), Moeen Ali 11(6) [5/122] No ball!
Ball 6 James Anderson 30(10), Moeen Ali 11(6) [5/123] 1 scored (Boland)
Run rate: 11.27  Required: 13.78
Over produced: 15 Score: (5/124)

Over 12.0 Bowler: Pat Cummins 1/19  (2.0 overs)
Ball 1 James Anderson 31(11), Moeen Ali 11(6) [5/124] 6 scored (Starc)
Run rate: 11.64  Required: 13.36
Ball 2 James Anderson 37(12), Moeen Ali 11(6) [5/130] 1 scored (Inglis)
Run rate: 11.56  Required: 13.50
Ball 3 Moeen Ali 11(6), James Anderson 38(13) [5/131] 1 scored (Starc)
Run rate: 11.48  Required: 13.65
Ball 4 James Anderson 38(13), Moeen Ali 12(7) [5/132] Appeal for run out. Out! (Warner)
Run rate: 11.31  Required: 13.92
Ball 5 Stuart Broad 0(0), Moeen Ali 12(7) [6/132] No ball!
Ball 5 Stuart Broad 0(0), Moeen Ali 12(7) [6/133] 1 scored (Lyon)
Run rate: 11.32  Required: 13.96
Ball 6 Moeen Ali 12(7), Stuart Broad 1(1) [6/134] 0 scored
Run rate: 11.17  Required: 14.25
Over produced: 10 Score: (6/134)

Over 13.0 Bowler: Josh Inglis 0/22  (2.0 overs)
Ball 1 Stuart Broad 1(1), Moeen Ali 12(8) [6/134] 6 scored (Carey)
Run rate: 11.51  Required: 13.79
Ball 2 Stuart Broad 7(2), Moeen Ali 12(8) [6/140] 2 scored (Starc)
Run rate: 11.51  Required: 13.83
Ball 3 Stuart Broad 9(3), Moeen Ali 12(8) [6/142] 0 scored
Run rate: 11.36  Required: 14.13
Ball 4 Stuart Broad 9(4), Moeen Ali 12(8) [6/142] 4 scored (Starc)
Run rate: 11.53  Required: 13.91
Ball 5 Stuart Broad 13(5), Moeen Ali 12(8) [6/146] 0 scored
Run rate: 11.38  Required: 14.23
Ball 6 Stuart Broad 13(6), Moeen Ali 12(8) [6/146] 4 scored (Cummins)
Run rate: 11.54  Required: 14.00
Over produced: 16 Score: (6/150)

Over 14.0 Bowler: Pat Cummins 1/29  (3.0 overs)
Ball 1 Moeen Ali 12(8), Stuart Broad 17(7) [6/150] Appeal for lbw.  Not out!
Run rate: 11.39  Required: 14.34
Ball 2 Moeen Ali 12(9), Stuart Broad 17(7) [6/150] 1 scored (Smith)
Run rate: 11.32  Required: 14.55
Ball 3 Stuart Broad 17(7), Moeen Ali 13(10) [6/151] Appeal for lbw.  Out!
Run rate: 11.19  Required: 14.92
Ball 4 Josh Tongue 0(0), Moeen Ali 13(10) [7/151] 4 scored (Cummins)
Run rate: 11.34  Required: 14.68
Ball 5 Josh Tongue 4(1), Moeen Ali 13(10) [7/155] Appeal for lbw.  Not out!
Run rate: 11.20  Required: 15.08
Ball 6 Josh Tongue 4(2), Moeen Ali 13(10) [7/155] 2 scored (Green)
Run rate: 11.21  Required: 15.17
Over produced: 7 Score: (7/157)

Over 15.0 Bowler: Usman Khawaja 0/25  (2.0 overs)
Ball 1 Moeen Ali 13(10), Josh Tongue 6(3) [7/157] 4 scored (Carey)
Run rate: 11.36  Required: 14.91
Ball 2 Moeen Ali 17(11), Josh Tongue 6(3) [7/161] 4 scored (Starc)
Run rate: 11.51  Required: 14.65
Ball 3 Moeen Ali 21(12), Josh Tongue 6(3) [7/165] Appeal for bowled! Out!
Run rate: 11.38  Required: 15.09
Ball 4 Harry Brook 0(0), Josh Tongue 6(3) [8/165] 4 scored (Green)
Run rate: 11.52  Required: 14.81
Ball 5 Harry Brook 4(1), Josh Tongue 6(3) [8/169] 0 scored
Run rate: 11.39  Required: 15.29
Ball 6 Harry Brook 4(2), Josh Tongue 6(3) [8/169] 4 scored (Inglis)
Run rate: 11.53  Required: 15.00
Over produced: 16 Score: (8/173)

Over 16.0 Bowler: Josh Inglis 0/38  (3.0 overs)
Ball 1 Josh Tongue 6(3), Harry Brook 8(3) [8/173] 3 scored (Boland)
Run rate: 11.60  Required: 14.90
Ball 2 Harry Brook 8(3), Josh Tongue 9(4) [8/176] 1 scored (Smith)
Run rate: 11.54  Required: 15.21
Ball 3 Josh Tongue 9(4), Harry Brook 9(4) [8/177] 4 scored (Khawaja)
Run rate: 11.68  Required: 14.89
Ball 4 Josh Tongue 13(5), Harry Brook 9(4) [8/181] 0 scored
Run rate: 11.55  Required: 15.46
Ball 5 Josh Tongue 13(6), Harry Brook 9(4) [8/181] 6 scored (Carey)
Run rate: 11.81  Required: 14.64
Ball 6 Josh Tongue 19(7), Harry Brook 9(4) [8/187] 6 scored (Murphy)
Run rate: 12.06  Required: 13.75
Over produced: 20 Score: (8/193)

Over 17.0 Bowler: Scott Boland 1/29  (2.0 overs)
Ball 1 Harry Brook 9(4), Josh Tongue 25(8) [8/193] Appeal for run out. Not out!
Run rate: 11.94  Required: 14.35
Ball 2 Harry Brook 9(5), Josh Tongue 25(8) [8/193] 1 scored (Warner)
Run rate: 11.88  Required: 14.73
Ball 3 Josh Tongue 25(8), Harry Brook 10(6) [8/194] 3 scored (Murphy)
Run rate: 11.94  Required: 14.57
Ball 4 Harry Brook 10(6), Josh Tongue 28(9) [8/197] 0 scored
Run rate: 11.82  Required: 15.30
Ball 5 Harry Brook 10(7), Josh Tongue 28(9) [8/197] 0 scored
Run rate: 11.70  Required: 16.11
Ball 6 Harry Brook 10(8), Josh Tongue 28(9) [8/197] 2 scored (Inglis)
Run rate: 11.71  Required: 16.33
Over produced: 6 Score: (8/199)

Over 18.0 Bowler: Cameron Green 0/0  (0.0 overs)
Ball 1 Josh Tongue 28(9), Harry Brook 12(9) [8/199] 4 scored (Lyon)
Run rate: 11.83  Required: 15.88
Ball 2 Josh Tongue 32(10), Harry Brook 12(9) [8/203] 4 scored (Green)
Required: 41 from 16
Ball 3 Josh Tongue 36(11), Harry Brook 12(9) [8/207] 2 scored (Cummins)
Required: 39 from 15
Ball 4 Josh Tongue 38(12), Harry Brook 12(9) [8/209] 1 scored (Carey)
Required: 38 from 14
Ball 5 Harry Brook 12(9), Josh Tongue 39(13) [8/210] 1 scored (Smith)
Required: 37 from 13
Ball 6 Josh Tongue 39(13), Harry Brook 13(10) [8/211] 3 scored (Carey)
Required: 34 from 12
Over produced: 15 Score: (8/214)

Over 19.0 Bowler: Usman Khawaja 1/41  (3.0 overs)
Ball 1 Josh Tongue 42(14), Harry Brook 13(10) [8/214] 1 scored (Smith)
Required: 33 from 11
Ball 2 Harry Brook 13(10), Josh Tongue 43(15) [8/215] 6 scored (Khawaja)
Required: 27 from 10
Ball 3 Harry Brook 19(11), Josh Tongue 43(15) [8/221] 6 scored (Starc)
Required: 21 from 9
Ball 4 Harry Brook 25(12), Josh Tongue 43(15) [8/227] 1 scored (Warner)
Required: 20 from 8
Ball 5 Josh Tongue 43(15), Harry Brook 26(13) [8/228] 0 scored
Required: 20 from 7
Ball 6 Josh Tongue 43(16), Harry Brook 26(13) [8/228] 1 scored (Khawaja)
Required: 19 from 6
Over produced: 15 Score: (8/229)

Over 20.0 Bowler: Scott Boland 1/35  (3.0 overs)
Ball 1 Josh Tongue 44(17), Harry Brook 26(13) [8/229] 2 scored (Starc)
Required: 17 from 5
Ball 2 Josh Tongue 46(18), Harry Brook 26(13) [8/231] 4 scored (Inglis)
Required: 13 from 4
Ball 3 Josh Tongue 50(19), Harry Brook 26(13) [8/235] 0 scored
Required: 13 from 3
Ball 4 Josh Tongue 50(20), Harry Brook 26(13) [8/235] 0 scored
Required: 13 from 2
Ball 5 Josh Tongue 50(21), Harry Brook 26(13) [8/235] 4 scored (Starc)
Required: 9 from 1
Ball 6 Josh Tongue 54(22), Harry Brook 26(13) [8/239] 4 scored (Starc)
Over produced: 14 Score: (8/243)


England Scorecard

Jonny Bairstow      bowled(Boland)         11 (8)
Dan Lawrence        run out (Cummins)      1 (1)
Chris Woakes        run out (Lyon)         44 (27)
Ollie Robinson      bowled(Cummins)        0 (1)
Joe Root            lbw (Carey)            22 (12)
James Anderson      run out (Warner)       38 (14)
Moeen Ali           bowled(Khawaja)        21 (13)
Stuart Broad        lbw (Cummins)          17 (8)
Josh Tongue         not out                58 (23)
Harry Brook         not out                26 (13)
Ben Stokes          not out                0 (0)
Extras                                     5

Total 8 for 243

Bowling

Josh Inglis        0/58 (24)
Scott Boland       1/49 (24)
Pat Cummins        2/36 (24)
Cameron Green      0/15 (6)
Usman Khawaja      1/56 (24)
Alex Carey         1/29 (18)

Press Enter to continue...
Australia (8/247) beat England (8/243)

Overall analysis
Games played: 1
Australia wins: 1
England wins: 0
Draws: 0
Average Australia Score: 247.00
Average England Score: 243.00