In: Computer Science
For this assignment you are required to build a system using BBC Micro:bit device. You will use the Micro:bit to gather data automatically using its sensors; and make it available on the internet. You are to deliver this data in a rigorous fashion to a PC attached via USB using the onboard Python, and then to run a local Python server on the PC with appropriate web pages to serve the result locally. Remote access to the PC is not required but would be simple to add. This assignment is designed to be as open as possible, and you are encouraged to be creative and innovative. This might be in the data collected, the manner of collection, the use of the data on the PC, etc. Marks will be awarded for interesting solutions; however, most of the marks are for the use of the techniques described above and below. Where an instruction might not be clear, you are to make a decision of what is reasonable to work, and justify this reasoning in the report, and video.
Details
1. Data Sampling
Take a measurement of at least two sensor variables that are plausibly connected (e.g. Temperature and light level), and regularly collect their measurements, storing them internally until the buffer is more than ¾ full, and then dump the contents to the PC. For example… o You need to simulate the changes for the sensors including light, temperature, accelerometer, and compass and explicitly describe their experimental setup. o Take the micro: bit into warmer and colder places and see how the temperature readings change. o Try out the built-in light sensing capability of the Micro:bit, o Flip the board; Page 2 of 4 o Test the kind of values that you get for the compass heading.
At the start of collection, the PC is to provide a time/date stamp to all devices, and they are to resynchronize every time a data transfer has successfully completed, and new data collection has started. If there is a significant difference, between internal date and synchronize-date, this is to be reported by the PC to the data files before re-synchronization to all data files prior to dumping the data onto them.
The sampling frequency of data is determined by the application (eg. temperature will not change frequently – unless it is a thermostat).
2. Display.
Whenever a sample is taken, the 5x5 display is to increment a single digit.
When the device is downloading, the display is to show a download icon.
When the collected data is confirmed to have been delivered and is cleared, then the display shows a tick mark. If a download error occurred, a cross is shown on the display.
3. Data Transmission
The data is to be labeled, and the time/date of collection is to also be recorded and dumped to the PC. Suggested data format is JSON.
.A suitable protocol is to be developed to ensure reliable transmission of the data. For example, a simple stop and wait ARQ.
The data in the onboard buffer of the connected Micro:bit is not to be deleted until the data has been confirmed to have arrived. Matched checksums might be sufficient.
4.PC Data
On the PC, the data can be stored as TAB-or Comma delimited data in a file in a fixed location.
The data is appended to any existing data in the file. This must be done at the PC end, in order to avoid running out of space, and the fact that file open in append mode is not possible on Micro:bit.
The data is to include the time/date stamp, device# doing the collection, the sensor variable name, and value.
Separate files are maintained for each sensor variable. This makes it easy to plot these files using Excel, or some such. As an extension. another Python package could run on the server to provide plot images.
5. Web server
The Python web server is to point to the folder containing the files. A web user could then select the file and see text data. An optional extension might be to store the data in HTML format but beware of tableend delimiters.
In a data collection of objects an python data collector is an key role where we can gatter a required data useing the inputs of different technologys where the data can be made modified and used
1. Data Sampling
Take a measurement of at least two sensor variables that are plausibly connected (e.g. Temperature and light level), and regularly collect their measurements, storing them internally until the buffer is more than ¾ full, and then dump the contents to the PC. For example… o You need to simulate the changes for the sensors including light, temperature, accelerometer, and compass and explicitly describe their experimental setup. o Take the micro: bit into warmer and colder places and see how the temperature readings change. o Try out the built-in light sensing capability of the Micro:bit, o Flip the board; Page 2 of 4 o Test the kind of values that you get for the compass heading.
At the start of collection, the PC is to provide a time/date stamp to all devices, and they are to resynchronize every time a data transfer has successfully completed, and new data collection has started. If there is a significant difference, between internal date and synchronize-date, this is to be reported by the PC to the data files before re-synchronization to all data files prior to dumping the data onto them.
The sampling frequency of data is determined by the application (eg. temperature will not change frequently – unless it is a thermostat).
2. Display.
Whenever a sample is taken, the 5x5 display is to increment a single digit.
When the device is downloading, the display is to show a download icon.
When the collected data is confirmed to have been delivered and is cleared, then the display shows a tick mark. If a download error occurred, a cross is shown on the display.
3. Data Transmission
The data is to be labeled, and the time/date of collection is to also be recorded and dumped to the PC. Suggested data format is JSON.
.A suitable protocol is to be developed to ensure reliable transmission of the data. For example, a simple stop and wait ARQ.
The data in the onboard buffer of the connected Micro:bit is not to be deleted until the data has been confirmed to have arrived. Matched checksums might be sufficient.
4.PC Data
On the PC, the data can be stored as TAB-or Comma delimited data in a file in a fixed location.
The data is appended to any existing data in the file. This must be done at the PC end, in order to avoid running out of space, and the fact that file open in append mode is not possible on Micro:bit.
The data is to include the time/date stamp, device# doing the collection, the sensor variable name, and value.
Separate files are maintained for each sensor variable. This makes it easy to plot these files using Excel, or some such. As an extension. another Python package could run on the server to provide plot images.
5. Web server
The Python web server is to point to the folder containing the files. A web user could then select the file and see text data. An optional extension might be to store the data in HTML format but beware of tableend delimiters.
,This are the posiable determiners of collecting data useing tensorflow ,keras etc.