5
4. Demonstration
With Arduino
Here we demonstrates how to use Grove - MOSFET to control a motor. We provide power for it
with external power source, but if your controlled device needs current smaller than 300mA,
Seeeduino can totally support it and no extra power source needed.
// demo of Grove - MOSFET
// use pin 6 to control a motor
int motorPin = 6;
void setup()
{
Serial.begin(38400);
pinMode(motorPin, OUTPUT);
Serial.println("Grove - MOSFET Test Demo!");
}
void loop()
{
motorOnThenOffWithSpeed();
motorAcceleration();
}
void motorOnThenOffWithSpeed()
{
Содержание Grove MOSFET
Страница 2: ...2 Document Revision History Revision Date Author Description 1 0 Sep 22 2015 Jiankai li Create file ...
Страница 6: ...3 2 Specification Working voltage 5V Vin 5 15V MOSFET Model CJQ4435 ...
Страница 7: ...4 3 Interface Vin accepts 5V 15V power of which current is less than 2A Vout attach actuators here ...
Страница 11: ...8 5 Resource Grove MOSFET Eagle File CJQ4435 Datasheet MOSFET_WIKI Getting started with Arduino ...