/* jquery */ /* jquery accordion style*/ /* jquery init */
Showing posts with label Astro. Show all posts
Showing posts with label Astro. Show all posts

Mars Rover for Micro:bit or Raspberry Pi Zero

JavaFX on Raspberry Pi

With all the excitement of the NASA Mars 2020 Mission launch on 30th July, maybe you fancy building your own Mars Rover vehicle.

Then take a look at the 4tronix MARS Rover Robot Kit.

The self-assembly kit is loosely based on the NASA/JPL Curiosity and Mars 2020 rover designand uses a similar rocker arm, bogey and differential arm mechanism.

It can be controlled with either a Micro:bit or Raspberry Pi Zero and comes complete with coding support for both these boards.

MARS Rover Robot Kit features include:
• 6 Motors - 80 rpm 6V, N20 micro gear motors
• 4 Servos - MG90S metal gear analog micro servos
• 4 Fire LEDS
• Ultrasonic distance sensor on steerable mast
• 30 special PCBs
• 11 different PCB designs

Pi Wars 2019

The recent Pi Wars 2019 was spaced-themed affair in honour of the 50th anniversary of the Apollo Moon landing.

New challenges included rough terrain (crafted from plaster, wood, and bandages (crafted from plaster, wood, and bandages), fetch-and-carry Spirit Of Curiosity task, the Canyons of Mars autonomous maze navigation, the Hubble Telescope vision course and the Apollo 13 Obstacle Course (with a tricky PiBorg travellator section).

Competitor entries included a Mars Rover look-alike and a robot that looked like Starbug from Red Dwarf. And PiBorg demonstrated off their upcoming three-wheeled RockyBorg robot.

Maybe these Space-themed challenges and robots will inspire you own inventions, either at home or at your next CoderDojo or Code Club meeting?

Incidentally, there a collection of Space-themed projects in the latest edition of the Hack Space magazine.

Try My Free Python Coding Tutorials

ISS and the Astro Pi

The 7th February marked the tenth anniversary of the launch of the European Columbus module using the Space Shuttle Atlantis.

The Columbus module, which is the European Space Agency’s largest single contribution to the ISS, supports scientific research including astrobiology, solar investigations, metallurgy and psychology.

Some of the 225 experiments have been performed by the Astro Pi computers, based on an off-the-shelf Raspberry Pi.

Find out how to build your own Astro Pi computer using a Raspberry Pi 2 or 3 and a Sense HAT.

Then explore the downloadable Astro Pi CSV data from Tim Peake's ISS mission, create a Python Date Filter and explore the investigate daily data pattern statistics.

More Raspberry Pi Python Coding Tutorials

 

2017 Raspberry Pi Challenges

It's 2017 so why not set yourself some new year Raspberry Pi challenges. Here's a few ideas:

Start coding in Python with my free in-depth Learn Python on the Raspberry Pi series of posts.

Use Python code to explore the downloadable Astro Pi CSV data from Tim Peake's ISS mission and create a Python Date Filter.

Build your own Astro Pi computer using a Raspberry Pi 2 or 3 and a Sense HAT.

Learn the Java programming language with tools like BlueJ (maybe using the BlueJ Learning Videos), or the Greenfoot IDE or Dr Java.

Customise the hackable Raspberry Pi Minecraft edition using Python code or with Java using BlueJ.

More Raspberry Pi Coding, Tips and Tricks

Astro Pi Data: Daily Pattern Statistics

So far we've seen how to write Python code to that loads and process Astro Pi CSV data files and how to filter the data for a specific date.

In this post we'll using some simple statistics functions to analyse each day in our data set to spot where something out of the ordinary happened.

To begin load up the date filter code and add a new import at the top (note you'll need to use Python 3.4 or later for this library module):.

import statistics

Now add these two new function definitions:

The get_first_date() function finds the first date in the date set. While the second collect_stats() calls this function before looping through all the rows to build date-specific data list for the specified column.

Then we call the statistics mean and variance statistical functions of our date-specific data collection. These values are then printed out.

Finally, in the main code area, we simply call the collect_daily_stats() function with our chosen column number.

As you can see from the output there was a big variance in the humidity data on 21st February 2016.

2016-02-17 humidity: count=4740 mean=45.41 variance=0.12
2016-02-18 humidity: count=8565 mean=45.54 variance=0.68
2016-02-19 humidity: count=8555 mean=45.22 variance=1.97
2016-02-20 humidity: count=8579 mean=44.90 variance=0.12
2016-02-21 humidity: count=8557 mean=49.07 variance=20.28
2016-02-22 humidity: count=8559 mean=47.65 variance=0.47
2016-02-23 humidity: count=8559 mean=47.12 variance=0.73
2016-02-24 humidity: count=8564 mean=47.34 variance=0.31
2016-02-25 humidity: count=8559 mean=46.86 variance=0.12
2016-02-26 humidity: count=8570 mean=46.49 variance=0.23
2016-02-27 humidity: count=8560 mean=45.73 variance=0.14
2016-02-28 humidity: count=8561 mean=45.71 variance=0.08
2016-02-29 humidity: count=8575 mean=45.02 variance=0.08

The Python statistics library model has many other functions, so have some fun experimenting with some other statistical techniques.

Start coding today with my Learn Python on the Raspberry Pi tutorial.

Astro Pi Data: Python Date Filter

In my previous Astro Pi Data post I showed how to load and process the downloadable Astro Pi Science CSV files using Python.

As I've already mentioned these CSV data files have over 100,000 rows. With this mind let's look at how to extract the data for one particular day.

We're going to start with the Python Basics code from last time, then add a new function and replace the processing loop.

Our function needs to take two parameters: the full list of rows and the date in question. It returned a new list containing only the date-matched rows.

Here's the Python 3 code:

Now we can call this function to populate a list variable with the date-specific data. After this we'll replace the previous row processing loop with one that iterates through the returned list.

Here's the code:

Next time we'll write code to identify interesting days using statistical methods.

Start coding today with my Learn Python on the Raspberry Pi tutorial.

Astro Pi Data: Python Basics

The adventures of Ed and Izzy aboard the International Space Station (ISS) have generated plenty of interest the the Raspberry Pi community and beyond. And so has the downloadable science data captured by sensors on the Astro Pi modules.

However, these CSV data files are large, even the smallest has over 100,000 rows. Consequently loading a CSV file into a spreadsheet for analysis is a long, slow process. A far more flexible option is to write some code. But how do you get started?

Here's a short Python 3 program (see below) that loads the CSV data in preparation for further analysis. Let's look at the code.

At the top we the Python module library imports followed by a few column number constants. You can add as many of these as you need. Here's the full column list.

Next we have the 'load_csv' function definition. It's this function that extracts data from the file and puts it into a two dimensional list, corresponding to the rows and columns of the spreadsheet. Then it extract the column names, from the first row, before removing this row. It returns the column names and data list.

Now we can call the 'load_csv' function with the CSV file name and store the returned column names and data list in variables.

Finally we set up a row processing loop. Here we just loop through the first 100 rows to get the humidity and timestamp data. But you could choose an alternative range or different column. Next time we'll create a data filter.

Try My Free Raspberry Pi Python Coding Tutorials

Astro Pi Data: CSV Columns

The downloadable Astro Pi Science Data CSV files contain quite a few columns. The scope includes Astro Pi temperature, ambient temperature, relative humidity, air pressure, 3D orientation, 3D acceleration, 3D magnetic field strength and 3D rotation.

Thankfully they all have meaningful names. Here's the full list:

row_id: Unique row identity number for each row
temp_cpu: Raspberry Pi CPU temperature degrees in Celsius
temp_h: Ambient temperature in Celsius (Sense HAT humidity sensor)
temp_p: Ambient temperature in Celsius (Sense HAT pressure sensor)
humidity: The percent relative humidity (Sense HAT humidity sensor)
pressure: Air pressure in millibars (Sense HAT pressure sensor)
pitch: Pitch orientation angle from 0 to 360 degrees (Sense HAT accel + gyro + mag data)
roll: Roll orientation angle from 0 to 360 degrees (Sense HAT accel + gyro + mag data)
yaw: Yaw orientation angle from 0 to 360 degrees (Sense HAT accel + gyro + mag data)
mag_x: X axis magnetic field strength in micro-teslas (Sense HAT magnetometer)
mag_y: Y axis magnetic field strength in micro-teslas (Sense HAT magnetometer)
mag_z: Z axis magnetic field strength in micro-teslas (Sense HAT magnetometer)
accel_x: The acceleration intensity of the X axis in Gs (Sense HAT accelerometer)
accel_y: The acceleration intensity of the Y axis in Gs (Sense HAT accelerometer)
accel_zv: The acceleration intensity of the Z axis in Gs (Sense HAT accelerometer)
gyro_x: X axis rotational intensity in radians per second (Sense HAT gyroscope)
gyro_y: Y axis rotational intensity in radians per second (Sense HAT gyroscope)
gyro_z: Z axis rotational intensity in radians per second (Sense HAT gyroscope)
reset: Copy of the Raspberry Pi CPU reset register
time_stamp: Date and time of data readings (Astro Pi real-time clock)

Also see my Astro Pi Data: Python Basics tutorial.

Astro Pi Data: Build Your Own Astro Pi

Would you like to build your very own Astro Pi to perform scientific experiments?

Well all you need is a Raspberry Pi board, a camera module and a Sense HAT. Some experiments can be done with the camera alone, but it's the Sense HAT that offers the most experimental potential.

Priced at under £30 the Sense HAT is a true multi-functional beast. Here's the feature list:

• 8×8 RGB LED display
• Gyroscope
• Accelerometer
• Magnetometer
• Temperature sensor
• Humidity sensors
• Barometric pressure sensor
• Mini 5 button joystick

For robustness Ed and Izzy are housed in a custom-made 6063 grade aluminium flight case. Yet you can even replicate this feature too as a Raspberry Pi blog post explains how to fabricate an Astro PI case using a 3D printer.

Also see my Astro Pi Data: Python Basics tutorial post.

Jodrell Bank Thoughts

Iconic, historic, engineering marvel, local landmark; words people associate with the Lovell Radio Telescope at Jodrell Bank.

Located deep in the heart of the North Cheshire countryside, many local roads offer fleeting glimpses of the towering structure over the hedgerows. On any particular day you can never predict the orientation of the parabolic collecting dish. It may be parked, off-line, in the cornflake bowl position, or aimed at a particular part of the sky, slowly and steadily gathering incredibly faint electromagnetic waves, constructing images of the universe we inhabit.

Sir Bernard Lovell's vision, drive and passion gave birth to the telescope in the late 1950s. A succession of upgrades and enhancements over the following decades has ensured the telescope maintains its position at the forefront of scientific research – this in an age where most technical and scientific equipment exhibit useful lifespans of, at best, a few years.

The surrounding picturesque grounds include not only smaller radio telescopes and associated buildings but also an arboretum, walking trails and nature habitats. A quiet and patient observer is treated to the richness of the resident wildlife; a multitude of birds including grouse, pheasants and water fowl, plus rabbits, hares and countless pond creatures.

Timeless and unchanging yet pioneering and world-centric; words I associate with the Jodrell Bank Observatory after a weekend visit, the highlight of an Introduction to Radio Astronomy course.

On entering the Lovell Telescope's control room your visual senses are confronted by the instantly recognisable scene from televised interviews and documentaries, the images unchanging across the decades from the iconic black and white footage to the present day broadcasts. However, appearances can be deceptive. Behind the original panels and classic dials, modern computer systems and control software are busily setting and maintaining the telescope orientation with pinpoint accuracy, to satisfy the needs and aspirations of modern scientific research.

The main library too appears timeless in nature, and best imagined in a sepia tone. Seated around a large table, surrounded by tall shelves crammed with a wealth of academic literary, you cannot fail to notice a heightened sense of gravity at the sheer weight of historical tomes. Indeed, you may ponder which famous people might have previously sat in your chosen chair.

Whilst not apparent to the casual visitor, the Lovell Telescope's significance and influence goes far beyond the confines of the site. It is a major player in both the UK's MERLIN and the European VLBI networks, which electronically connect a number of radio telescopes together. The UK's MERLIN network has an apparent dish size of 134 kilometres, providing significantly improved imaging of faint or distant objects. However, the European VLBI is even larger, connecting radio telescopes as far apart as Spain and Italy to Sweden and Poland, enabling astronomers to peer back in time to the origins of our universe, over 13 billion years ago.



Visit the comprehensive Jodrell Bank Observatory web site or be entertained and informed by the bi-monthly astronomy Jodcast.