Sampling ldr temp and pressure data into 120 sample FIFO buffer.

Dependencies:   BME280 BMP280

Fork of Task690-mbed-os-FZ429ZI by University of Plymouth - Stages 1, 2 and 3

Committer:
osmith2
Date:
Sat Dec 23 18:44:37 2017 +0000
Revision:
6:c2299e3de428
Parent:
5:cc1b9f5c27a0
used sprintf to put all info (date,time,temp,pressure,ldr) into a string of characters, called DaT; ; It is my recommendation that the addToBuffer function be changed from float to char, as the only thing that needs to go into the buffer is DaT.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
osmith2 5:cc1b9f5c27a0 1 #ifndef __BUFFER__
osmith2 5:cc1b9f5c27a0 2 #define __BUFFER__
osmith2 5:cc1b9f5c27a0 3
osmith2 5:cc1b9f5c27a0 4 #include "mbed.h"
osmith2 5:cc1b9f5c27a0 5
osmith2 5:cc1b9f5c27a0 6 //Size of the morse character buffer
osmith2 6:c2299e3de428 7 #define BUFFERSIZE 20 // CW specified 120 samples
osmith2 5:cc1b9f5c27a0 8
osmith2 5:cc1b9f5c27a0 9 extern Semaphore spaceAvailable;
osmith2 5:cc1b9f5c27a0 10 extern Semaphore samplesInBuffer;
osmith2 5:cc1b9f5c27a0 11 extern Mutex bufferLock;
osmith2 5:cc1b9f5c27a0 12
osmith2 5:cc1b9f5c27a0 13
osmith2 5:cc1b9f5c27a0 14 extern void addToBuffer(float c);
osmith2 5:cc1b9f5c27a0 15 extern float takeFromBuffer();
osmith2 5:cc1b9f5c27a0 16
osmith2 5:cc1b9f5c27a0 17
osmith2 5:cc1b9f5c27a0 18
osmith2 5:cc1b9f5c27a0 19
osmith2 5:cc1b9f5c27a0 20 #endif