Latest Buzz...
                  

Translate

Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Monday, September 7, 2020

Refining Automated Contact Tracing

 The Australian Government launched a contact tracing App, COVIDSafe, that records "close contacts" - people who have been close to each other for 15 minutes. 

This type of contact tracing will miss contacts where infection is acquired from a contaminated surface several hours after an infected person has left a location. 

From "How long does the novel coronavirus live on different surfaces?" - 

An example may be a bus where surfaces become contaminated by an infected passenger early in the morning, then passengers who travel on the same bus in the afternoon become infected due to contact with contaminated surfaces. 

The bus could have a bluetooth beacon device that uniquely identifies the bus. Passengers' phones running the COVIDSafe App could record the fact that they have travelled on the bus as they get on. 

If anyone who was on the bus tests positive to Covid-19, the COVIDSafe App data will show not only who they have been near for 15 minutes, but also places they have been where they may have acquired the infection - or where they may have contaminated surfaces where other people may later become infected. 

Finding 3 or 4 people who test positive for Covid-19 who have been on the same bus, even if not at the same time, will provide evidence of transmission via contaminated surfaces - which is more informative than the existing COVIDSafe App that can only identify contacts who have been near to each other. 

These "bluetooth beacon devices" could be placed anywhere: in elevators in apartment blocks and offices, near ATMs and at the entrances of cafes, restaurants and bars, etc. 

Suitable microprocessors for building "bluetooth beacon devices" are readily available, easy to program, and are inexpensive. 

The development and construction of the "bluetooth beacon devices" would create jobs. 

See for example -

"ESP32 BLE + Android + Arduino IDE = AWESOME

and this tutorial video on YouTube -



Tuesday, April 3, 2018

Robots go faster with Interrupt Service Routines


Example of an Arduino Uno sketch that uses an interrupt service routine to measure distance with an ultrasonic sensor.
JSN-SR04T DC5V Waterproof Ultrasonic Module Distance Measuring Sensor
JSN-SR04T DC5V Waterproof Ultrasonic Module Distance Measuring Sensor

A small modification allows the sketch to use both the interrupt service routine and the blocking "pulseIn()" statement that causes the processor to wait for the measurement to be completed. Notice the number of times the loop() subroutine is executed while waiting for each measurement to be completed.

Sample output - 
Measurement obtained by interrupt service routine only
======================================================
Number of times loop() executed while measurement being taken: 228
isr_start_occurred = 1, isr_end_occurred = 1, isr_change_occurred = 2
distance from interrupt service routine 28   cm

Number of times loop() executed while measurement being taken: 1360
isr_start_occurred = 1, isr_end_occurred = 1, isr_change_occurred = 2
distance from interrupt service routine 149   cm


Sample output - 
Measurement obtained by both 
interrupt service routine and "pulseIn()" statement
===================================================
Number of times loop() executed while measurement being taken: 1
isr_start_occurred = 1, isr_end_occurred = 1, isr_change_occurred = 2
distance from pulseIn() statement 27   cm
distance from interrupt service routine 28   cm


Number of times loop() executed while measurement being taken: 1
isr_start_occurred = 1, isr_end_occurred = 1, isr_change_occurred = 2
distance from pulseIn() statement 148   cm
distance from interrupt service routine 149   cm

Click on the button below to copy the sample sketch.