Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site



Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Problems with pin 11 and multiprotocol shield on Arduino Uno
PostPosted: Thu May 31, 2018 1:35 pm 

Joined: Thu May 31, 2018 1:22 pm
Posts: 1
This is a very simple piece of code. If you connect "inPin" and ground the led in pin 13 will turn off, otherwise it will be on. However as soon as you call socket1.ON() pin 11 stop working properly. If you use for example pin 7, everything works fine.

I guess it has to do with SPI, but in my case I don't want to use SPI, I want to use pin 11 as a digital pin. Is there any way I can solve this?

Thanks

Code:
#include <MCP23008.h>
#include <multiprotocolShield.h>

int ledPin = 13;
int inPin = 11;


void setup()
{
  pinMode(ledPin, OUTPUT);
  pinMode(inPin, INPUT_PULLUP);
  socket1.ON();
}


void loop()
{

  int val = digitalRead(inPin);
  digitalWrite(ledPin, val);
   
}


Top
 Profile  
 
 Post subject: Re: Problems with pin 11 and multiprotocol shield on Arduino
PostPosted: Fri Jun 01, 2018 10:56 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi,

Please try to use unsetCSSocket1() and unsetCSSocket0() functions of the library arduinoUtils to disable the SPI.

Hope this helps.
Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.