Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of i2c scanner by
SensorBoards.cpp
- Committer:
- Grginho
- Date:
- 2017-09-09
- Revision:
- 1:22bad558be6c
File content as of revision 1:22bad558be6c:
#include "SensorBoards.h"
uint8_t getSensorNumbers(uint8_t address)
{
//return boards[0].numberOfSensors;
}
uint8_t getSensorIDs(uint8_t address, uint8_t *IDBuffer){}
void getSensorReadings(uint8_t address, uint8_t ID, uint8_t* IDMeasure){}
int8_t SensorBoardScanner()
{
I2C i2c(D14, D15); // sda, scl
Serial pc(USBTX, USBRX); // tx, rx
pc.printf("RUN\r\n");
for(int i = 0; i < 128 ; i++) {
i2c.start();
//Upisi u boards[i]
if(i2c.write(i << 1)) pc.printf("0x%x ACK \r\n",i); // Send command string
i2c.stop();
}
}
