0

MONSTER M4SK + I2C
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

MONSTER M4SK + I2C

by rengowrath on Fri Oct 25, 2019 1:14 pm

Hey guys, I'm trying to mod this monster mask to be able to receive inputs from a RC transmitter to control the eyes. Since the mask itself only seems to have a few available pins on it, I'm trying to use i2c to communicate between an arduino teensy that is hooked up to the RX and the mask itself. Unfortunately this hasn't gone well.

At first, I simply tried doing an i2c request from the mask to the teensy every frame to get the RX data. This worked, but the performance was awful - I went from about 55 fps to 12 fps. I tried increasing the i2c bus frequency but this causes a lot of instability with the mask (after about a minute, the mask freezes). Next, I tried turning the teensy into a master sender and transmitting the data to the mask on a specific address. However this totally breaks the mask and I have to upload circuitpython using the recovery mode just to be able to get it programmable again.

Any help would be appreciated.

rengowrath
 
Posts: 3
Joined: Wed Oct 23, 2019 4:26 am

Re: MONSTER M4SK + I2C

by adafruit2 on Sat Oct 26, 2019 1:16 am

hiya what's a lowcost RC receiver we can check out? RC output is PWM so its kinda weird to use, but the idea is intersting to explore :)

if you're not using the PDM mic interface you can turn that 4-pin port into a serial port with:

Code: Select all | TOGGLE FULL SIZE
Uart Serial1( &sercom3, PIN_SERIAL1_RX PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
void SERCOM3_0_Handler() { Serial1.IrqHandler(); }
void SERCOM3_1_Handler() { Serial1.IrqHandler(); }
void SERCOM3_2_Handler() { Serial1.IrqHandler(); }
void SERCOM3_3_Handler() { Serial1.IrqHandler(); }

adafruit2
Site Admin
 
Posts: 18778
Joined: Fri Mar 11, 2005 7:36 pm

Re: MONSTER M4SK + I2C

by rengowrath on Tue Oct 29, 2019 12:44 pm

Can the same be done with an ATmega328 Nano Board? Do I need a voltage stepper if the ATmega328 is running at 5V?

rengowrath
 
Posts: 3
Joined: Wed Oct 23, 2019 4:26 am

Re: MONSTER M4SK + I2C

by adafruit2 on Tue Oct 29, 2019 12:51 pm

just have the i2c pullups to 3.3V and you should be able to communicate safely.

adafruit2
Site Admin
 
Posts: 18778
Joined: Fri Mar 11, 2005 7:36 pm

Re: MONSTER M4SK + I2C

by rengowrath on Wed Oct 30, 2019 2:07 am

I don't understand how to do that. It looks like the 4pin JST connectors aren't available anyway. But my original question still stands. Why can't I set the M4SK to a slave reader for I2C and why is I2C so slow when using at as master reader?

rengowrath
 
Posts: 3
Joined: Wed Oct 23, 2019 4:26 am

Re: MONSTER M4SK + I2C

by adafruit2 on Fri Nov 01, 2019 1:20 pm

i2c slave isnt supported in samd51 yet - this PR is adding it if you'd like to try it out!
https://github.com/adafruit/ArduinoCore-samd/pull/185

adafruit2
Site Admin
 
Posts: 18778
Joined: Fri Mar 11, 2005 7:36 pm

Re: MONSTER M4SK + I2C

by tonyhansen on Sun Nov 03, 2019 4:30 pm

I'm using Monster M4SK with a WiiChuck connected to a NunChucky to drive the eyes over I2C.

See the pull request at https://github.com/adafruit/Adafruit_Le ... s/pull/915 for how I did it. It was pretty straightforward with the NunChucky.

Hope you're able to do what you want.

tonyhansen
 
Posts: 14
Joined: Fri Nov 29, 2013 12:37 am

Re: MONSTER M4SK + I2C

by adafruit2 on Sun Nov 03, 2019 6:47 pm

nice work! do you by chance have a video? we could blog it up! :)

adafruit2
Site Admin
 
Posts: 18778
Joined: Fri Mar 11, 2005 7:36 pm

Re: MONSTER M4SK + I2C

by tonyhansen on Sun Nov 03, 2019 10:05 pm

Thanks

I just posted some short videos on YouTube of how I used the WiiChuck to control both the Monster M4sk eyes and NeoPixels:
https://youtu.be/BZY-lZ0ZZ4w
https://youtu.be/Ac1BB5OKh9E
https://youtu.be/2Pk1g2Lr45A

IMG_4793-600x800.JPG
IMG_4793-600x800.JPG (145.37 KiB) Viewed 80 times

tonyhansen
 
Posts: 14
Joined: Fri Nov 29, 2013 12:37 am

Please be positive and constructive with your questions and comments.