[SOLVED] request for tb6612fng library [USE THE SPARKFUN LIBRARY]

Can someone help me port this library?
Post Reply
icelon
Posts: 9
Joined: Fri Apr 08, 2016 2:31 pm

[SOLVED] request for tb6612fng library [USE THE SPARKFUN LIBRARY]

Post by icelon » Thu Aug 24, 2017 4:26 pm

I need a library for tb6612fng that works on the mini maple or some indication of how to use it, the times I have worked with the arduino there was always something that failed ... (slowness, speed ... goblins ...)

zmemw16
Posts: 1681
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: tb6612fng

Post by zmemw16 » Thu Aug 24, 2017 5:37 pm


icelon
Posts: 9
Joined: Fri Apr 08, 2016 2:31 pm

Re: tb6612fng

Post by icelon » Thu Aug 24, 2017 6:03 pm

ok only for arduino .... thanks

PD I will have to use google .... finally my ask does not go fine .... :P

zmemw16
Posts: 1681
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: tb6612fng

Post by zmemw16 » Thu Aug 24, 2017 9:18 pm

that's what we use around here, only it's on a stm32 platform.
some changes might be required, but without looking you don't know that.
stephen

User avatar
RogerClark
Posts: 7683
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: tb6612fng

Post by RogerClark » Thu Aug 24, 2017 9:51 pm

it's hardly worth using a library to control that device. If you look in the GitHub repo for the library

https://github.com/sparkfun/SparkFun_TB ... no_Library

All it does is set the speed using analogWrite and control the direction using digitalWrite.

The library does one dodgy thing, as it calls pinMode in the global constructor, and this used to cause problems, but I think it may be OK since Victor managed to move the PINMAP to flash.

I would not personally bother using that library as some of the functions block the main loop as it uses delay() to time how long to run the motor, which means you code can't do anything while the motor is running.

zmemw16
Posts: 1681
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: [SOLVED] request for tb6612fng library [USE THE SPARKFUN LIBRARY]

Post by zmemw16 » Fri Aug 25, 2017 9:32 am

roger,
he asked for a library ;)
i can't help it if it's trivial and handles things in a non-portable way.
the real message is in the '10secs'

stephen
now using 2 flying ssd laptops, pretty sure they both beat 10s to the login prompt from a cold start :D :D

User avatar
RogerClark
Posts: 7683
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: [SOLVED] request for tb6612fng library [USE THE SPARKFUN LIBRARY]

Post by RogerClark » Fri Aug 25, 2017 11:59 am

@zmemw16

No worries...

They can try that library and if it doesnt work, it would be trivial to write their own code

Post Reply