Hola chicos!
Tengo ya varios meses haciendo ejercicio con Arduino y hasta ahora bien, y ahora mismo estoy haciendome un control de conmutacion para un modulo que controla un motor de una Locomotora que ya vendre por aqui hacer preguntas,
Y aqui viene la primera, me he decidido de Toggle en algunos Pines que necesitos para ese projectos, aunque no se si me va a funcionar bien usando el Puerto Serial para un Bluetooth HC-05 , pero lo estoy intentando.
el problema que se me presenta ahora es, con DigitalToggle que me baje la libreria y segun lei en varios Foros hay que hacerle cambio en algunos #include y es ahi donde no me aclaro ya haciendo los cambios.
El Codigo que estoy usando para probar es este-
#include <digitalToggle.h>
/*
* Description:
* Blink an LED using the DigitalToggle library.
*
*/
int ledPin1 = 13;
void setup() {
pinMode(ledPin1, OUTPUT);
}
void loop(){
delay(500);
digitalToggle(ledPin1);
}
el include aqui le hice los cambios
/*
* DigitalToggle.h - A simple lightweight pin toggle utility library
* v0.1 - 2009-July-6
* Copyright (c) 2009 David Knaack. All right reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DigitalToggle_h
#define DigitalToggle_h
#include <arduino.h>
#define digitalToggleFast(P) *portInputRegister(digitalPinToPort(P)) = digitalPinToBitMask(P)
void digitalToggle(uint8_t P);
#endif
el original es este
/*
* DigitalToggle.h - A simple lightweight pin toggle utility library
* v0.1 - 2009-July-6
* Copyright (c) 2009 David Knaack. All right reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DigitalToggle_h
#define DigitalToggle_h
#include <pins_arduino.h>
#define digitalToggleFast(P) *portInputRegister(digitalPinToPort(P)) = digitalPinToBitMask(P)
void digitalToggle(uint8_t P);
#endif
Alguien me podria decir que hago yo falso?
Google no me ha ayudado para nada, en otros foros no encuentros soluccion al error..
Un Saludos