Forum Software Ferduino code Pin 80 - 82

Pin 80 - 82


Post Number:#1 Post Mon Mar 20, 2017 2:33 pm
Posts: 8
Topics: 3
Solve rating: 0
Joined: Thu Mar 09, 2017 11:51 am
Topics: 3
Age: 52
Gender: None specified
National Flag:
South Africa
Fernando

I understand that if using the PCF8575, it creates 16 additional IO port, which you then declare as P0 - P15
- this is straight forward and your code is easy to understand/follow..

What I don't yet understand is where pins 80 - 87 (used for timers, and other functions) are coming from?
(defined in setup.ino)

At first I figured pins 80 - 87 are linked to Analogue pins A0 - A14, but then I realised it cant be as this would then conflict to the functions already assigned to these pins (such as dosing pumps)- and I checked the logic to determine if pins 80-87 refer to physical pins on the Mega, but this too seems ilogical.

not sure if this is related to the other users post: viewtopic.php?f=8&t=411#p3134
..from this post it would seem that these are temporary pins that need to be assigned to "free" pins as needed?

been a long day, maybe I have it all wrong, and you can give simple explanation?

Post Number:#2 Post Mon Mar 20, 2017 4:15 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Any pin number higher than 69 is fictitious.

Analog pins are 54 to 69.

..from this post it would seem that these are temporary pins that need to be assigned to "free" pins as needed?


It's right when you don't have a PCF8575.

When using a PCF8575 you should uncomment the line bellow:

#define USE_PCF8575


Then look for this part of the code:

//****************************************************************************************************
///************************************** PCF8575 ****************************************************
//****************************************************************************************************
// Do not change this part if you have not a PCF8575 installed.
// Não altere esta parte se você não tem um PCF8575 instalado.
#ifdef USE_PCF8575 // Do not change this line!
const byte ozonizadorPin = 0;       // P0       // Pino que liga o ozonizador
const byte reatorPin = 1;           // P1       // Pino que liga o CO2 do reator.
const byte bomba1Pin = 2;           // P2       // Bomba que tira água da quarentena.
const byte bomba2Pin = 3;           // P3       // Bomba que tira água do sump.
const byte bomba3Pin = 4;           // P4       // Bomba que coloca água no sump.
const byte temporizador1 = 5;       // P5       // Pino que liga o timer 1.
const byte temporizador2 = 6;       // P6       // Pino que liga o timer 2.
const byte temporizador3 = 7;       // P7       // Pino que liga o timer 3.
const byte temporizador4 = 8;       // P8       // Pino que liga o timer 4.
const byte temporizador5 = 9;       // P9       // Pino que liga o timer 5.
const byte solenoide1Pin = 10;      // P10      // Liga a reposição de água doce.
const byte alimentadorPin = 11;     // P11      // Pino que controla o alimentador automático.
const byte skimmerPin = 12;         // P12      // Pino que controla o skimmer
#endif // Do not change this line!


Forget all lines inside of this "if":

#ifndef USE_PCF8575 // If not defined (uncommented) USE_PCF8575 ignore it.
.
.

Any thing here won't be considered!

.
.
#endif


Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Tue Mar 21, 2017 12:57 am
Posts: 8
Topics: 3
Solve rating: 0
Joined: Thu Mar 09, 2017 11:51 am
Topics: 3
Age: 52
Gender: None specified
National Flag:
South Africa




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron