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.
main.cpp
- Committer:
- Kio_Liex
- Date:
- 2016-02-04
- Revision:
- 5:47575b30c19a
- Parent:
- 4:9c0216df5c8e
- Child:
- 7:d8f4e9d92ab5
File content as of revision 5:47575b30c19a:
#include "mbed.h"
#include "HC05.h"
DigitalOut myLed(LED1);
Serial pc(USBTX, USBRX); // tx, rx
HC05 myBT(D1, D0); // tx, rx
int16_t xVal=0, yVal=0, cVal=0;
int main()
{
pc.baud(115200);
pc.printf("\r\n -= Serial Bluetooth test \r\n");
while(1)
{
myBT.getValue(&xVal, &yVal, &cVal);
if(xVal || yVal || cVal > 0)
{
pc.printf("X= %d, Y= %d, C= %d \r\n",xVal, yVal, cVal);
}
myLed = !myLed;
}
}