• 0
jpswensen

Motor shield and buttons/LED of i2c not working

Question

We have been using the Motor Shield with uc32 microcontrollers for a while in our Mechatronics course. We have mostly used them for the easy wiring of servo motors and for doing DC motor control with encoder, and they have worked awesome.

However, I wanted to start using the buttons and the LEDs through the i2c bus. I downloaded the code from the website and tried to run it, but it doesn't seem to be communicating right over i2c. We have switched to using chipKit Core  with the ArduinoIDE for the last couple of semesters. I have tried to debug a bit, but can't seem to figure out why the Wire library might not be working to communicate between the uc2 and the motor shield.

Has anyone used the uc2 and motor shield lately and actually got the i2c to the buttons and LEDs working?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Hi @jpswensen,

Welcome to the Digilent Forums!

I was able to get the example project on the chipKIT Motor Shield Resource Center working. I am using the Arduino IDE version 1.8.1 and the Digilent Core here

In the UC32 reference manual here on page 3 it states  "17. J11 – I 2C Dedicated I2C signals. These pins are independent of the settings of jumpers JP6 and JP8. However, if JP6 and JP8 are in the RG3 and RG2 position, the I2C signals will be tied to pins A4 and A5 on J7"  

JP6 and JP8 need to be jumpered to RG3 and RG2. This ties the I2C signals to pins A4 and A5 on J7.  These pins are used in the example demo.

cheers,

Jon

 

Share this post


Link to post
Share on other sites
  • 0

Thanks! I had been so focused on something being wrong with the motor shield and its setting that I hadn't even bothered to look at the jumper setting for the uc32. Sorry for the noise and thanks for the quick fix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now