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.
Dependencies: ADS1231
main.cpp
- Committer:
- ilispili
- Date:
- 2020-11-15
- Revision:
- 0:25b57eb80db0
File content as of revision 0:25b57eb80db0:
/* mbed Microcontroller Library * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 */ #include "mbed.h" #include "platform/mbed_thread.h" #include "ADS1231.h" // Blinking rate in milliseconds #define BLINKING_RATE_MS 100 Serial pc(USBTX, USBRX); ADS1231 myWeightSensor ( d13, d12 ); int main() { pc.baud ( 57600 ); pc.printf( "Raw Data: %ld Mass: %0.5f kg Voltage: %0.5f mV\r\n", (uint32_t)myData.myRawValue, myCalculatedMass.myMass, 1000*myCalculatedVoltage.myVoltage ); myled1 = 1; wait(3);