Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, salmanfarisvp, violet, jeremy882, crail.lyu969

Post Reply
kivan
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Thu Jul 26, 2018 2:34 am

Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Post by kivan » Thu Jul 26, 2018 2:48 am

Hi,

I'm doing a Master's project using the Grove Mega Shield 1.2, a Grove Vibration Motor, and the Arduino Mega 2560.

I've tried running the provided demo code for the motor, which is plugged into D8-9. Nothing happens.

However, when I plug it into an IIC connector (did this by accident as was also trying the Haptic Vibration Motor), I get the motor vibration but no response to the code i.e. no off state.

I pretty much want to do what this poster asked on your forum, but using the mega shield:

viewtopic.php?f=17&t=5636&p=20557&hilit ... tor#p20557

I assume it's something to do with the pin configuration, but I'm at a loss and am probably missing something obvious. Any help would be greatly appreciated!

Failing that, is it possible to have the haptic motor do this? I assume not, and that I'm limited to using the effects provided by the driver?

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Post by bill.yu » Thu Jul 26, 2018 11:23 am

Hi there, we have 2 vibration sensor, one is Grove - Vibration Motor(use the digital port to control,http://wiki.seeedstudio.com/Grove-Vibration_Motor/) the other is Grove - Haptic Motor(use the I2C to control, http://wiki.seeedstudio.com/Grove-Haptic_Motor/), please let us know if the issue is not solved. thanks.

best rgds
Bill

kivan
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Thu Jul 26, 2018 2:34 am

Re: Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Post by kivan » Sat Jul 28, 2018 1:11 am

Hi Bill,

That's the problem I'm having, with the Vibration Motor (I have the Haptic Motor too, which works fine).

The Vibration Motor doesn't respond in digital ports for me.

I've tried D8-9 with the demo code, which is set to digital pin 9, and I've tried it in the other digital ports and changed the pin in the code, but nothing happens (obviously I'd usually have the USB plugged in):
IMG_20180727_180252.jpg
IMG_20180727_180252.jpg (3.17 MiB) Viewed 1535 times
Am I doing something wrong?

If I plug it into I2C, it vibrates, but doesn't work with the code, because the code is expecting a digital pin:
IMG_20180727_180401.jpg
IMG_20180727_180401.jpg (3.06 MiB) Viewed 1534 times

bill.yu
Junior-7
Junior-7
Posts: 735
Joined: Mon Apr 02, 2018 11:05 am

Re: Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Post by bill.yu » Tue Jul 31, 2018 1:55 pm

Hi there, the yellow cable is signal cable, so please change the pin to D8 in code. please try and let is know the result.thanks.
Bill

kivan
Pre-kindergarten
Pre-kindergarten
Posts: 3
Joined: Thu Jul 26, 2018 2:34 am

Re: Grove Mega Shield 1.2 + Grove Vibration Motor - correct pin to use?

Post by kivan » Wed Aug 01, 2018 1:43 am

bill.yu wrote:
Tue Jul 31, 2018 1:55 pm
Hi there, the yellow cable is signal cable, so please change the pin to D8 in code. please try and let is know the result.thanks.
Bill
This worked perfectly, thank you so much!

Post Reply