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: WebSocketClient WiflyInterface mbed messages
Fork of BatteryModelTester by
Diff: main.cpp
- Revision:
- 10:e8b66718a103
- Parent:
- 9:9b6a54e63942
--- a/main.cpp Tue Nov 29 12:22:14 2016 +0000
+++ b/main.cpp Tue Nov 29 15:02:01 2016 +0000
@@ -37,6 +37,7 @@
#include "Commands.h"
#include "Websocket.h"
#include "ADC.h"
+#include "pwm.h"
//#define DEBUG
#define INFOMESSAGES
@@ -73,12 +74,17 @@
// Connect to the wifi network. It will basically get stuck here until it
// connects to the network.
SetupNetwork(5000);
-
+
// Configure the baud rate of the wifi shield:
// This will make our wireless transmissions much faster.
ws.setBaud(115200);
wait(0.5f);
+ // Configure the PWM module:
+ ConfigurePWM(Duty_us, PwmPeriod_us);
+ // Turn on the PWM:
+ TurnOnPWM(true);
+
// Check to see we are connected to the network:
if(IotStatus.CheckFlag(SF_WIRELESSCONNECTED)){
// Try to connect to the WebSocket server:
