![](/media/cache/profiles/f0fcf351df4eb6786e9bb6fc4e2dee02.jpg.50x50_q85.jpg)
DRV8830/TI Motor Driver sample program.\\ This program can control two motors.
main.cpp
- Committer:
- kenjiArai
- Date:
- 2014-07-12
- Revision:
- 2:e0b9fd6126d1
- Parent:
- 1:e9d1c42a73ae
- Child:
- 3:db817fb05ba7
File content as of revision 2:e0b9fd6126d1:
/* * mbed Application program for the mbed ST NUCLEO F401RE Board * Test program -> Check LED & Serial com. * * Copyright (c) 2014 Kenji Arai / JH1PJL * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: July 12th, 2014 * Revised: July 12th, 2014 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ // Include --------------------------------------------------------------------------------------- #include "mbed.h" // Object ---------------------------------------------------------------------------------------- Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); //------------------------------------------------------------------------------------------------- // Control Program //------------------------------------------------------------------------------------------------- int main() { int i = 1; pc.printf("\r\nHello World !\r\n"); pc.printf(" by JH1PJL "__DATE__"\r\n"); while(1) { pc.printf("This program runs since %d seconds.\r\n", i++); myled = !myled; wait(1.0); } }