Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Development / Neural Network Arduino on: January 23, 2011, 02:57:36 pm
hola!
developing a perceptron in Arduino, Arduino is:

#include <math.h>

int p1;
int p2;
int n;

void setup() {
pinMode(13, OUTPUT);
pinMode(7, INPUT);
pinMode(8, INPUT);
}

void loop(){
p1=digitalRead(7);
p2=digitalRead(smiley-cool;

n=((1*p1)+(2*p2))+(-3);

if (n>=0) {
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
}

this is a simple two-input perceptron from here you develop RNA complete luck

Dr. Alejandro Medina Santiago
Instituto Tecnologico de Tuxtla Gutierrez
Posgrade Mechatronic
Chiapas, México
medinas23@yahoo.com.mx
Pages: [1]