KeyDuino forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Un échange d'information autour de la carte KeyDuino
 
HomeHome  Latest imagesLatest images  RegisterRegister  Log inLog in  

 

 Pins in Use/different from Leonardo - SOLVED

Go down 
2 posters
AuthorMessage
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySun 27 Mar - 21:32

I've been experimenting with a SparkFun MP3 shield, but I can't get the SD card component to work.  Is there any pins in use or not connected compared to a standard Leonardo?  I'm thinking that the NFC reader is using something and interfering in some way.  Ideas?

Update: The only apparent way to get this shield, or similar shields wired for Uno SPI working is to jumper from the ICSP connector to pins 11-13. This connector is in a slightly different place for the KeyDuino, but even a "normal" Uno would have the same problem.


Last edited by Andriod on Sat 9 Apr - 13:56; edited 1 time in total
Back to top Go down
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySun 27 Mar - 21:57

I should note, I tried the Sparkfun MP3 Player and the Arduino Ethernet shield. Both worked on my Uno, neither on my Keyduino. I don't have a true Leonardo to compare.
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyTue 29 Mar - 7:53

Hello Andriod,
I see what is your problem. Normaly, the connection for the SPI are done by the ISP connector (2*3 connector).

With the keyduino, due to the antenna, the connector are deported here:
Pins in Use/different from Leonardo  - SOLVED Keydui10

You have two options:
- make the connection between the ISP of your shield and the ISP from keyduino by some jumpers.
or, if your shield is also connected at the pin d13,d12,d11, you can change you code by changing the SPI pin by software SPI.

I can help you if you send me the reference link of your shield Smile
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyWed 30 Mar - 0:43

I thought you were onto something, but I took a look and the MP3 shield doesn't even have that ISP connector, much less headers on one, here's a link to it's details if you'd be kind enough to offer another guess: https://learn.sparkfun.com/tutorials/mp3-player-shield-hookup

Pins in Use/different from Leonardo  - SOLVED 5244a984757b7f993b8b456b
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyWed 30 Mar - 8:03

Maybe it's because they define they define sck,mosi,miso instead of 13,12,11.
These pins for leonardo are on the isp so it couldn't works if you don't make a modification by software spi, I will take a look with the code Wink
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyWed 30 Mar - 10:36

Ahh, so a real Leonardo would have the same problem, do you have a link to a fix or shall I let google help me with that?
Back to top Go down
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyWed 30 Mar - 13:45



Ok, I think I found it, in https://github.com/frasermac/sdfatlib/blob/master/SdFat/SdFatConfig.h

#define LEONARDO_SOFT_SPI 0

I'll try setting that to

#define LEONARDO_SOFT_SPI 1

Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyFri 1 Apr - 5:42

Hi Andriod, does this modification works for you? I also buy a mp3 shield to do a phone controled playlist with a rgb leds strip Smile keep you in touch !
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyFri 1 Apr - 10:40

No luck on the simple switch, trying to do the same thing through a few different libraries/techniques.
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySun 3 Apr - 19:44

Hi Andriod, I bought a mp3shield so I can try to solve the spi problem.
If you use some jumper for sck, mosi & miso,it works but I didn't search for a software solution for now.

If you want to do the modification, I will send you a picture of the connection Smile

Bye,
Pierre
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyMon 4 Apr - 0:34

Sure, I'm going to detail my attempts to do it with software when I get a chance too.
Back to top Go down
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyMon 4 Apr - 4:27

Ok, still no good, what I'm trying to do to is reset the pins by copying the library into my sketchbook and editing Sd2PinMap.h like this:

Code:
#elif defined(__AVR_ATmega32U4__)
// Leonardo / Keyduino

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 2;
uint8_t const SCL_PIN = 3;

// SPI port
[color=#FF0000]uint8_t const SS_PIN = 10;
uint8_t const MOSI_PIN = 11;
uint8_t const MISO_PIN = 12;
uint8_t const SCK_PIN = 13;[/color]

That should just about do it I think, not quite sure what the standard technique is here.
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyMon 4 Apr - 5:09

I see that the 13 from the 32u4 is a 10bit pwm, 12&11 are 16bits, so I don't know if it's possible. Can you try the same but with a pwm pin for sck? Like 10 or 9 and use a jumper?
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyMon 4 Apr - 11:23

I'm thinking I need to enable SoftSPI still, but not seeing a switch for it yet.
Back to top Go down
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyThu 7 Apr - 4:20

Ok, seeing some notes that it's just plain impossible, can you post your jumpers--if i'ts anything but a plain jumper? I may cut over to my EL shield as a first project.
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyThu 7 Apr - 7:16

Hi Andriod, sad to here that Sad

Here is the mapping for the SPI connection:
Pins in Use/different from Leonardo  - SOLVED Sans_t10
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyThu 7 Apr - 11:10

And you just jumpered it?
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptyThu 7 Apr - 11:19

Yep, if you don't define d13, d12, d11 woth the sketch it's okay
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySat 9 Apr - 3:40

Ok, got home but haven't rummaged all my parts bins looking for a low profile jumper. Did you have any trouble getting the jumper wires to the ISCP connector? The corner of my MP3 shield is up there, but I'm thinking it may have a date with a Dremel.
Back to top Go down
MrStein
KeyDuino TEAM
MrStein


Messages : 85
Reputation : 4
Date d'inscription : 2015-10-10
Age : 31
Localisation : Lille, FRANCE

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySat 9 Apr - 5:34

In my case, I have removed the plastic of the connector so it fit with the shield Wink
Back to top Go down
https://keyduino.forumsactifs.com
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySat 9 Apr - 13:53

OK! Wired it in and we're in business! Back to my actual project, the personal sound track music box.
Back to top Go down
Andriod
beginner
beginner



Messages : 18
Reputation : 0
Date d'inscription : 2016-03-20

Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED EmptySat 9 Apr - 19:13

Hmm, little trouble with the buzzer being on SCK.  Everytime I reset the board it screams at me.  No problem once the sketch starts though.
Back to top Go down
Sponsored content





Pins in Use/different from Leonardo  - SOLVED Empty
PostSubject: Re: Pins in Use/different from Leonardo - SOLVED   Pins in Use/different from Leonardo  - SOLVED Empty

Back to top Go down
 
Pins in Use/different from Leonardo - SOLVED
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
KeyDuino forum :: KeyDuino informations & questions :: HARDWARE questions & informations-
Jump to: