Data Science with the CS11

Collecting data is the heartbeat of data science and the inspiration for a range of lesson plans and learning opportunities.

The CS11 programmable core from XinaBox with an onboard slot for a microSD card is the perfect foundation on which you can design a broad range of data gathering devices. Easy to build, easy to code and perfect for all educational settings from early learning to university level research.

This page contains all the materials you need to get started using the CS11 to build digital data gathering instruments.

Essential Hardware:

A typical data gathering tool will have the following components:

  • One or more sensors, e.g. a weather or a light sensor.
  • A power source, e.g. coin cell, AA battery, USB.
  • At least one output mechanism, e.g. a screen, memory card, Wi-Fi.
  • A microprocessor and a way of programming it.

The xChips shown above can be used to build an instrument that will record data from the sensor and save it (i.e. output it) onto the SD card that is attached to the CS11. You can extend this in a number of ways:

  • add more sensors: there are examples on this page that use a weather sensor (SW02 or SW03) and a light / colour sensor (the SL06)
  • add an actuator or servo motor for automation projects
  • battery power can be added to make it portable
  • a screen may be added to allow data to be viewed in real time
  • a Wi-Fi, LoRa or Bluetooth xChip might be added to extract data wirelessly
  • GPS could be added for geo-tagging

Note - before using your microSD card we recommend that you format it. To find out how to format a microSD card check out this wikihow page.

Precompiled code:

You can build a variety of cool digital instruments without needing to write any code. We have provided precompiled code that will allow you to build the following:

1: an Environmental Monitor:

Find out everything you need to use the xChips shown below to build an environmental monitor:

2: A light / proximity / colour / gesture / weather monitor:

Find out everything you need to use the xChips listed below to build an instrument that measures light, proximity, temperature, pressure, altitude, gestures and colours.

3: A survey tool for administering questionnaires and collecting data

Find out how to use the xChips shown below to make a survey tool that will allow you to set up and administer a questionnaire.  It will also record results onto a microSD card and records the lux reading when each questionnaire was administered, allowing you to link responses to light levels.

Experimenting:

Once your data logging instrument is up and running you are ready to begin to use it, and there is no shortage of practical applications, both inside and outside of the classroom.

We have compiled a number of different experiments that you can use the CS11 instruments to implement, and we'll be adding more as time goes by:

Experiment: Description Link
The relationship between temperature and atmospheric pressure

Gay-Lussac's law states that temperature and pressure have a high correlation.

Use the SW01, SW02 or SW03 xChip to investigate this relationship.

Link to experiment
The effect of altitude on temperature Take one of the weather sensors (SW01/2/3) on a field trip to see how temperature and altitude are related Link to experiment
The relationship between temperature and humidity Use the SW01 or SW02 xChips to investigate the relationship between temperature and relative humidity. Link to experiment
What happens to temperature and pressure when the sun rises Use the SW01, SW01 or SW03 xChip to investigate the impact of sunrise on temperature and atmospheric pressure. Link to experiment
Investigating air quality Use the SW02 xChip to measure Volatile Organic Compounds and CO2 in the air. Link to experiment


Coding the CS11 in MakeCode:

If the pre-compiled code does not give you all the functionality you need why not code the CS11 yourself? There are a number of different platforms and editors to choose from, including microPython in Mu, ArduinoIDE or mBed.

The simplest option for coding the CS11 is to use MakeCode, the free online block coding IDE from Microsoft that also supports JavaScript.

The image below shows a simple program built in MakeCode using drag-and-drop. It will read the temperature from an SW01 xChip and show it on the OLED display. The program will then wait for a little bit and will repeat:

A program to turn your CS11 and SW01 (or SW02 / SW03) into a thermometer

Everything you need to get started coding the CS11 using MakeCode is detailed in this How-to Guide.

There is more information on how to code the OD01 OLED display in this How-to guide. The guide is written for the CS11 and micro:bit: coding the OD01 works the same for both in MakeCode. 

To see how you can use microPython (specifically CircuitPython) in Mu to code the CS11 check out these projects (and note that the CC03 and CS11 are inter-changeable):

Going further with XinaBox:

The CS11 core can be coded using a broad range of editors / platforms and you can extend with any of the xChips in our range - there currently over 80 with more being added all the time. Power up your data science toolkit with all sorts of capabilities and functions, including:

And loads more - check out the full range of xChips.