Paul Sutton

Paul Sutton – personal blog

STEM Group 8/7/2022

The next stem group will be on 8th July 2023, 11am to 15:00. We will carry on from the previous code club, but also look at our own projects a bit more.

We will probably carry on with programming, we are using a mix of different websites for this. These are listed below.

I will bring my Pi Pico, as I have upgraded the Larson scanner from last week to just use red LEDs. Still hoping to find a someone who can make the code more efficient.

Useful Links

I have been working on a few simple Raspberry Pi Pico projects, so should be able to demonstrate something at the next event. Hopefully more than just a flashing LED.

Please see a blog post from 10th June for some information as I am using this projects book to help me.

IT Room

I will post further updates to my main blog

Links

Tags

#PaigntonLibrarySTEMGroup

Pi pico Larson Scanner part 2

Further to the previous post. I spent some time on this, trying to fix the problem. This is mostly re-written.

I have also made the lights run faster as per video below

Code is below.

delay = 0.05 #set delay

I would recommand a delay of 1 second for testing purposes, so it is easier to try and follow the code as it is running.

  • larsonscan.py
#flash on board pico led
# updated 1/7/2023 - working code
import machine 
import utime

#delay = input("Time Delay: ")

#bind LEDs / GPIO pins to variables

ledg = machine.Pin(11, machine.Pin.OUT) #green
ledb = machine.Pin(12, machine.Pin.OUT) # blue led
ledw = machine.Pin(13, machine.Pin.OUT) # white led
ledy = machine.Pin(14, machine.Pin.OUT) # yellow led
ledr = machine.Pin(15, machine.Pin.OUT) # red led 

#turn all LEDs off 

ledg.value(0) #off
ledb.value(0) #off
ledw.value(0) #off
ledy.value(0) #off
ledr.value(0) #off

utime.sleep(3)

#utime.sleep(2) # TWO second delay
#led_onboard = machine.Pin(25, machine.Pin.OUT)

delay = 0.05 #set delay

#ledg.value(0) ledg.value(1)
#ledb
#ledw
#ledy
#ledr

#g b w y r y w b -< repeat so therefore next led is back to g

while True:
    ledg.value(1)#on
    utime.sleep(delay)
    ledb.value(1) #on
    utime.sleep(delay)  
    ledg.value(0)#on
    utime.sleep(delay)
    ledw.value(1)
    utime.sleep(delay)
    ledb.value(0)
    utime.sleep(delay)
    ledy.value(1)
    utime.sleep(delay)
    ledw.value(0)
    utime.sleep(delay)
    ledr.value(1)
    utime.sleep(delay)
    ledy.value(0)
    utime.sleep(delay)
    ledr.value(1)
    utime.sleep(delay)
    ledy.value(1)
    utime.sleep(delay)
    ledr.value(0)
    utime.sleep(delay)
    ledw.value(1)
    utime.sleep(delay)
    ledy.value(0)
    utime.sleep(delay)
    ledb.value(1)
    utime.sleep(delay)
    ledw.value(0)
    utime.sleep(delay)  

Tags

#uPython,#RaspberryPiPico,#LarsonScanner,#PhysicalComputing

Code Club 1/7/2023 writeup

So today we did more of the usual coding. I spent some of the time trying to fix the issue I had with the Pi pico routine I have been working on. Please see earlier post.

This now appears to be fixed (or at least working a lot better than it was) and there should be video and photos up on the library website and social media pages.

I will get a video made for this and uploaded to peertube and post the new code block in a new post.

Next week is the STEM Group on 8th July 11 to 15:00 at the library.

I have put some of the links from this below as a list.

Useful Links

If you also sign up to the Raspberry Pi foundation, you can track your own progress and collect badges. This is optional, as this presents more ways for data to be collected.

As before if you would like to save work, please sign up for a scratch or Trinket account so you can save project progress and carry on at home or at the next session.

Video

Tags

#CodeClub,#Projects,#Python,#Scratch,#Coding.#Programming,#Children, #Education

Code Club 1/7/2023

The next Paignton Library code club is on Saturday 1st July 2023 10 am to 12:00. We will carry on with with the Code Club projects, hour of code and perhaps hour of code.

Perhaps some more discussions around Technology, AI, Coding, etc.

I spent some time Friday afternoon setting up the room

code club 1

I have put some of the links from this below as a list.

Useful Links

If you also sign up to the Raspberry Pi foundation, you can track your own progress and collect badges. This is optional, as this presents more ways for data to be collected.

As before if you would like to save work, please sign up for a scratch or Trinket account so you can save project progress and carry on at home or at the next session.

Video

Tags

#CodeClub,#Projects,#Python,#Scratch,#Coding.#Programming,#Children, #Education

Pi pico Larson Scanner

I am trying to build a project that simulates a larson scanner (from the original BSG) where the LED light looks like it is is moving back and forth. Granted I am using different colour LEDs here, But I can replace them later. Having different coloured LEDs at this stage, does seem to be helpful.

The issue seems to be with the yellow LED.

So to start off with the video

And the code is as foilows

#flash on board pico led

import machine 
import utime

#delay = input("Time Delay: ")

#bind leds gpip to variables

ledg = machine.Pin(11, machine.Pin.OUT) #green
ledb = machine.Pin(12, machine.Pin.OUT) # blue led
ledw = machine.Pin(13, machine.Pin.OUT) # white led
ledy = machine.Pin(14, machine.Pin.OUT) # yellow led
ledr = machine.Pin(15, machine.Pin.OUT) # red led 

#turn all leds off 

ledg.value(0) #off
ledb.value(0) #off
ledw.value(0) #off
ledy.value(0) #off
ledr.value(0) #off

utime.sleep(2) # TWO second delay
#led_onboard = machine.Pin(25, machine.Pin.OUT)

delay = 0.1

while True:
    ledg.value(1)#on
    utime.sleep(delay)
    ledr.value(0) #on
    utime.sleep(delay)
    ledb.value(1) #on
    utime.sleep(delay)  
    ledg.value(0)#on
    utime.sleep(delay)  
    ledw.value(1)#off
    utime.sleep(delay)  
    ledb.value(0) #on
    utime.sleep(delay)  
    ledy.value(1)
    utime.sleep(delay)  
    ledw.value(0)#off
    utime.sleep(delay)  
    ledy.value(1) #on
    utime.sleep(delay)  
    ledr.value(1) #on
    utime.sleep(delay)  
    ledy.value(0)
    utime.sleep(delay)  
    ledy.value(1) 
    utime.sleep(delay)
    ledr.value(0)
    utime.sleep(delay)
    ledw.value(1)
    utime.sleep(delay)
    ledy.value(0)
    utime.sleep(delay)
    ledb.value(1)
    utime.sleep(delay)
    ledw.value(0)
    utime.sleep(delay)
    ledb.value(1)
    utime.sleep(delay)
    ledg.value(1)
    utime.sleep(delay)
    ledb.value(0)
    utime.sleep(delay)     # one second delay  

I think there is also a more efficient way to do this. I would rather have this solution fixed, than do the same thing with more efficient code.

Tags

#uPython,#RaspberryPiPico,#LarsonScanner,#Physical computing

Scratch Frog Jump

I have created this for code club members.

This is what we are going to make, when you click on the frog it will jump up, come back down and make a croak sound.

img 1

  1. Add the background.,

img 2

  1. Select the frog from the animals section of spites.

img 3

  1. Finally add some code to the sprite, you will need to choose the frog sound.

img 4

img 4

Notes

The code to reset the position isn't needed, unless you add other code that will move the frog left / right for example and you need to reset back to original position.

Links

Tags

#CodeClub,#Game,#Animation.#FrogJump

Euclid meets launches this weekend.

The EU Euclid mission to study nature of dark energy and dark matter. is due to launch this weekend.

Euclid is an ESA mission to map the geometry of the Universe and better understand the mysterious dark matter and dark energy, which make up most of the energy budget of the cosmos. The mission will investigate the distance-redshift relationship and the evolution of cosmic structures by measuring shapes and redshifts of galaxies and clusters of galaxies out to redshifts ~2, or equivalently to a look-back time of 10 billion years. In this way, Euclid will cover the entire period over which dark energy played a significant role in accelerating the expansion of the Universe. [1]

There is also a comprehensive launch kit available [2] in English and other languages from.

References

  1. Euclid mission
  2. Launch Kit
  3. Science Forums

TAGS

#DarkEnergy,#DarkMatter,#EU,ESA,#Mission,Euclid

Personal CPD update

I have now completed more CPD. Firstly updated safeguarding for the next 12 months. I will however, need to download and read KCSIE 2023 in September.

safeguarding

Also undertaken a Zen Educate Tutoring course

Tutoring

Which is really useful and has some excellent resources linked to this.

Tags

#CPD,#Safeguarding,#Tutoring,#Learning,#Education

County Lines child criminal exploitation.

Trevelyan Middle School's pioneering film about County Lines child criminal exploitation.

I am sharing this to get the message out about county lines and the misery this is causing.

All we need now is a government, who will deal with this properly and robustly.

Generative AI is enabling fake voice scams

Interesting article looking at Generative AI is enabling fake voice scams, identity fraud which is both interesting and pretty scary stuff, people easily fall for scams, especially those who may be more vulnerable or who have friends / family in parts of the world they can't easily be contacted. This would allow scammers to pose as family members, and obtain money by fraudulent means.

This is the sort of thing, we should be discussing so that we can come up with solutions, staying one step of the enemy when the enemy are already several steps ahead of us.

Perhaps talk about this at a future stem group meeting.