Show Posts
|
|
Pages: 1 [2] 3 4 ... 6
|
|
16
|
International / Deutsch / Arduino hängt sich auf
|
on: July 05, 2012, 05:20:49 pm
|
|
Hallo, ich bastel gerade an einem kleinen Projekt, dass eigentlich nur eine Nachicht auf einem LCD darstellen soll (geschenk). ich bastel das ganze auf einer Lochrasterplatine und bei dem Hello World script zeit er auch etwas an, hängt sich aber nach kürzester Zeit auf. Manchmal kommt er sogar nur bis "Hal". Es gibt bestimmt eine einfache Erklärung. Könnt ihr mir da aus erfahrung helfen worans vllt liegen kann? Danke schonmal!
|
|
|
|
|
18
|
International / Deutsch / Re: MSGEQ7 Anfängerproblem
|
on: December 20, 2011, 05:23:53 pm
|
|
also aus hong kong waren es schon 2 wochen. Aber ich glaub es gibt auch welche aus GB die kosten dann halt n paar euro mehr, aber auch nicht viel ^^da ich halt ewig zeit hatte hab ich halt gewartet
|
|
|
|
|
19
|
International / Deutsch / Re: MSGEQ7 Anfängerproblem
|
on: December 20, 2011, 03:23:55 pm
|
Hi, ich hab die vor ner ganzen Weile auf Ebay aus Hongkong gekauft, und einfach mal gewartet. In der Zwischenzeit hab ich dann halt meinen RGB Tisch gebaut  Max
|
|
|
|
|
20
|
International / Deutsch / MSGEQ7 Anfängerproblem
|
on: December 20, 2011, 02:55:01 pm
|
Hallo, ich habe gerade meinen MSGEQ7 aufgebaut, und auch schon einmal getestet. Sobald ich aber mit einem Frequenzgenerator vom Pc aus ein Audiosignal sende, sagen wir mal 400Hz, gehen direkt alle Kanäle auf min 800 hoch. Ich habe ihn übrigens mit diesem Tuturial aufgebaut: http://skoba.no-ip.org/msgeq7/Ich habe die Schaltung schon einige Male überprüft. Irgendwer weiss bestimmt was da falsch ist, kann ja nichts so aussergewönliches sein. Danke schonmal:) Max
|
|
|
|
|
21
|
Using Arduino / Networking, Protocols, and Devices / Making the Arduino do stuff using the ENC28J60
|
on: October 20, 2011, 09:01:40 am
|
Hi everyone, yesterday i recieved my Arduino Ethernet shield, just to find out it doesnt use the original chip, but the ENC28J60. So after at least 40.000 hours on the internet i found this post. http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1275614308/15By using this library http://blog.thiseldo.co.uk/?p=329 and some code by Perfo i was able to turn on and off a few LEDS. But i wasnt able to add more buttons, because it appears the Arduino only sopports very little HTML code. So everything you do, is to write en additonal HTML you can run on the computer or a server to open the arduino pages in an invisible window in the browser. So first the Arduino code (of corse you have to change the IP) // EtherShield gate controller #include "etherShield.h" #include <IRremote.h> #include <IRremoteInt.h>
// Random mac address // IP that shouldn't clash with anything else on the LAN static uint8_t mymac[6] = { 0x54,0xA5,0x58,0x1B ,0x00,0x24}; static uint8_t myip[4] = { 192,168,0,16}; #define DEBUG
#define MYWWWPORT 80 #define BUFFER_SIZE 750 static uint8_t buf[BUFFER_SIZE+1]; int LED1=3; int LED2=4; int LED3=5; int LED1status = 0; int LED2status = 0; int LED3status = 0; IRsend irsend; // The ethernet shield EtherShield es=EtherShield();
uint16_t http200ok(void) { return(es.ES_fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nPragma: no-cache\r\n\r\n"))); }
// prepare the webpage by writing the data to the tcp send buffer uint16_t print_webpage(uint8_t *buf) { uint16_t plen; plen=http200ok();
return(plen); }
void setup(){
// initialize enc28j60 Serial.begin(9600); es.ES_enc28j60Init(mymac); // init the ethernet/ip layer: es.ES_init_ip_arp_udp_tcp(mymac,myip, MYWWWPORT); pinMode (LED1, OUTPUT); pinMode (LED2, OUTPUT); pinMode (LED3, OUTPUT);//set open pin to ouptut //on first run set both the open and close outputs to logic zero to prevent unknown states digitalWrite(LED2,LOW); digitalWrite(LED1,LOW); digitalWrite(LED3,LOW);//set the open output to logic zero
}
void loop(){ uint16_t plen, dat_p;
while(1) { // read packet, handle ping and wait for a tcp packet: dat_p=es.ES_packetloop_icmp_tcp(buf,es.ES_enc28j60PacketReceive(BUFFER_SIZE, buf));
/* dat_p will be unequal to zero if there is a valid * http get */ if(dat_p==0){ // no http request continue; } // tcp port 80 begin if (strncmp("GET ",(char *)&(buf[dat_p]),4)!=0){ // head, post and other methods: dat_p=http200ok(); dat_p=es.ES_fill_tcp_data_p(buf,dat_p,PSTR("<h1>200 OK</h1>")); goto SENDTCP; } // three web page in the "root directory" of the web server if (strncmp("/ard.html ",(char *)&(buf[dat_p+4]),8)==0){ dat_p=print_webpage(buf); goto SENDTCP; } else if (strncmp("/ard2.html ",(char *)&(buf[dat_p+4]),8)==0){ if(LED1status==1) { irsend.sendNEC(0xFFF807,32); LED1status=0; Serial.println(LED1status); } else { LED1status=1; irsend.sendNEC(0xFFB04F,32); Serial.println(LED1status); } dat_p=print_webpage(buf); goto SENDTCP; }
//RED else if (strncmp("/ard3.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFF9867,32); dat_p=print_webpage(buf); goto SENDTCP; } //GREEN else if (strncmp("/ard4.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFFD827,32); dat_p=print_webpage(buf); goto SENDTCP; }
//BLUE else if (strncmp("/ard5.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFF8877,32);//set open output to logic one dat_p=print_webpage(buf); goto SENDTCP; } //WHITE else if (strncmp("/ard6.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFFA857,32);//set open output to logic one dat_p=print_webpage(buf); goto SENDTCP; } //STROBE else if (strncmp("/ard7.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFF00FF,32);//set open output to logic one dat_p=print_webpage(buf); goto SENDTCP; } else{ dat_p=es.ES_fill_tcp_data_p(buf,0,PSTR("HTTP/1.0 401 Unauthorized\r\nContent-Type: text/html\r\n\r\n<h1>401 Unauthorized</h1>")); goto SENDTCP; } SENDTCP: es.ES_www_server_reply(buf,dat_p); // send web page data // tcp port 80 end
}
}
My Code now sends IR signals but you can just exchang this for LEDS or whater you want expl. irsend.sendNEC(0xFF00FF,32); => digitalWrite(LED1,HIGH); and this is the htmlcode you can just write in an editor and save it as code.html (again change the IP) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>AWESOME CONTROLE</title>
</head> <body>
<h1>Fernsteuerung</h1>
<iframe src="startseite.htm" name="Fensterlein" marginheight="10" marginwidth="10" align="right" height="0" width="0"> &amp;amp;amp;amp;lt;p&amp;amp;amp;amp;gt;Ihr Browser kann leider keine eingebetteten Frames anzeigen&amp;amp;amp;amp;lt;/p&amp;amp;amp;amp;gt; </iframe> <center> <p><a href="http://192.168.0.16/ard2.html" target="Fensterlein"><b>RGB ON/OFF</b></a><b><br>
<a href="http://192.168.0.16/ard3.html" target="Fensterlein"><b>RED<br>
</b></a><b><b><a href="http://192.168.0.16/ard4.html" target="Fensterlein"><b>GREEN</b></a><b><br>
<a href="http://192.168.0.16/ard5.html" target="Fensterlein"><b>BLUE</b></a><b><br>
<a href="http://192.168.0.16/ard6.html" target="Fensterlein"><b>WHITE</b></a><b><br>
<a href="http://192.168.0.16/ard7.html" target="Fensterlein"><b>STROBE</b></a><b><br> </center>
<p></p>
<b><b><b><b><br>
</b></b> </b></b> </body> </html>
you can the that for example the button RGB ON/OFF opens in the invisble window Fensterlein the Arduinopage http://192.168.0.16/ard2.html and in the Arduinocode you can the what happens in that case //RED else if (strncmp("/ard3.html ",(char *)&(buf[dat_p+4]),8)==0){ irsend.sendNEC(0xFF9867,32); dat_p=print_webpage(buf); goto SENDTCP; } In this case it sends the IR signal irsend.sendNEC(0xFF9867,32); but once again you can put in whatever you want. The only problem by now, is that it only runs in your local network. I heard of dyndns but can anyone maybe post a tuturial? im using a D-Link di-524. So i hoped many can use this, to create theire one proyects, and someone helps me with connecting the arduino to the real internet 
|
|
|
|
|
22
|
International / Deutsch / Re: Probleme beim Nutzen des Arduinos ohne die Standartumgebung
|
on: October 19, 2011, 08:43:42 am
|
verzeihung, dass ich erst jetz antworte, aber ich hatte vorher keine zeit. Das mit dem Code posten wusste ich nicht aber für die Zukunft sicher hilfreich  Also ich habe einen IR Empfänger an pin 11, Rot an bin 6, Grün an pin 9 Blau an pin 10. Ich habe mittlerweile auch rausgefunden, dass das Problem an der roten Ader liegt. Solang ich nur digitalWrite nutze funktioniert alles wunderbar. Sobald ich den Fader oder den Farbmixer einschalte, welche analogWrite nutzen, stürzt der Arduino ab und resetet. Vllt hilft das ja bei der Lösung. Als stromversorgung habe ich einfach ein USB Kabel aufgeschnitten und Power und Ground an die jeweiligen Pole auf der Platine gelötet. Das ganze hängt an einem 1A USB ladegerät. Es hat vorher auch schon funktioniert, aber sobald ich den Arduino so auf der Lochrasterplatine verlötet habe, haben die Probleme angefangen. Es kann ja eingentlich nichts Softwaremässiges sein, aber auch die Hardware, bis auf PWM funktioniert. Ich habe auch schon Pin 5 und 3 ausprobiert. Langsam verzweifel ich doch ein klein wenig.
|
|
|
|
|
23
|
International / Deutsch / Probleme beim Nutzen des Arduinos ohne die Standartumgebung
|
on: October 15, 2011, 10:42:03 am
|
Hallo, ich habe mir in den letzten Tagen einen RGB LED controler zusammengebastelt, welchen man über IR ansteuern kann, und der auch wunderbar funktioniert. Nun habe ich den Arduino auf eine Lochrasterplatine verpflanzt (natürlich mit quartz und allem) und anscheinend funktoiniert auch alles. Ich kann rot, grün, blau und weiss anwählen. Die Strobe funktion funktioniert, und ich kann auch die Zeit zwischen den einzelnen "strobes" verändern. Nur wenn ich den Fader oder die "Mix" funktion nutzen möchte, resettet der Arduino sich selbst. Ich habe absolut keinerleit erklärung dafür, da schliesslich exakt die gleichen Pins benutzt werden. Anbei ist der Code, sollte er irgendetwas bringen. Jegliche vermutungen wären sehr hilfreich :D vielen dank schonmal max /* * IRtraffic - control a walk / don't walk sign. * * An IR detector/demodulator must be connected to the input 11. * Relays must be connected to outputs 3 and 4. * * This uses the IRremote library: http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html * Copyright 2010 Ken Shirriff * http://arcfn.com */
// Program variables int redVal = 255; // Variables to store the values to send to the pins int greenVal = 0; // Initial values are all off int blueVal = 0;
#include <IRremote.h>
#define RECV_PIN 11
#if 0 #define OFF_CODE 0xFFF807 // Stop on Sony DVD remote #define ON_CODE 0xFFB04F // 1 on Sony DVD remote #define RED_CODE 0xFF9867 #define GREEN_CODE 0xFFD827 #define BLUE_CODE 0xFF8877// 1 on Sony DVD remote #define WHITE_CODE 0xFFA857 #define STROBE_CODE 0xFF00FF #define FADE_CODE 0xFF58A7 #define UP_CODE 0xFF906F #define DOWN_CODE 0xFFB847 #define MIX_CODE 0xFF30CF #define REDUP_CODE 0xFF50AF #define REDDOWN_CODE 0xFF38C7 #define GREENUP_CODE 0xFF7887 #define GREENDOWN_CODE 0xFF28D7 #define BLUENUP_CODE 0xFF708F #define BLUEDOWN_CODE 0xFFF00F #else
#define OFF_CODE 0xFFF807 #define ON_CODE 0xFFB04F #define RED_CODE 0xFF9867 #define GREEN_CODE 0xFFD827 #define BLUE_CODE 0xFF8877 #define WHITE_CODE 0xFFA857 #define STROBE_CODE 0xFF00FF #define FADE_CODE 0xFF58A7 #define UP_CODE 0xFF906F #define DOWN_CODE 0xFFB847 #define MIX_CODE 0xFF30CF #define REDUP_CODE 0xFF50AF #define REDDOWN_CODE 0xFF38C7 #define GREENUP_CODE 0xFF7887 #define GREENDOWN_CODE 0xFF28D7 #define BLUENUP_CODE 0xFF708F #define BLUEDOWN_CODE 0xFFF00F #endif
#include "WProgram.h" int modus=0; int moduson=0; long previousStrobe = 0; long strobeinterval = 20; long previousFade = 0; long fadeinterval = 50; int ledState = LOW; int redmix =170; int bluemix=170; int greenmix=170; IRrecv irrecv(RECV_PIN); decode_results results; int phase =1;
void setup() {
pinMode(6, OUTPUT); //red pinMode(9, OUTPUT); //green pinMode(10, OUTPUT); //blue irrecv.enableIRIn(); // Start the receiver }
void loop() { // Process the IR input, if any if (irrecv.decode(&results)) {
if (results.value == OFF_CODE) { moduson=0; } else if (results.value == ON_CODE) { moduson=1; }
else if (results.value == RED_CODE) { modus=0; } else if (results.value == GREEN_CODE) { modus=1; } else if (results.value == BLUE_CODE) { modus=2; }
else if (results.value == WHITE_CODE) { modus=3; }
else if (results.value == STROBE_CODE) { modus=4; }
else if (results.value == FADE_CODE) { modus=5; }
else if (results.value == MIX_CODE) { modus=6; }
else if (results.value == UP_CODE) { if(modus==4) { strobeinterval=strobeinterval+5; } if(modus==5) { fadeinterval=fadeinterval+5; } }
else if (results.value == DOWN_CODE) { if(modus==4) { strobeinterval=strobeinterval-5; }
if(modus==5) { if(fadeinterval>5) { fadeinterval=fadeinterval-5; } } }
else if (results.value == REDUP_CODE) { if(redmix+15<=255) { redmix=redmix+15; } else { redmix=255; } }
else if (results.value == REDDOWN_CODE) { if(redmix-15>=0) { redmix=redmix-15; } else { redmix=0; } }
else if (results.value == GREENUP_CODE) { if(greenmix+15<=255) { greenmix=greenmix+15; } else { greenmix=255; } }
else if (results.value == GREENDOWN_CODE) { if(greenmix-15>=0) { greenmix=greenmix-15; } else { greenmix=0; } }
else if (results.value == BLUENUP_CODE) { if(bluemix+15<=255) { bluemix=bluemix+15; } else { bluemix=255; } }
else if (results.value == BLUEDOWN_CODE) { if(bluemix-15>=0) { bluemix=bluemix-15; } else { bluemix=0; } }
else { } irrecv.resume(); // Resume decoding (necessary!) }
if(moduson==0) { digitalWrite(6, LOW); digitalWrite(9, LOW); digitalWrite(10, LOW); }
if(modus==0 && moduson==1) { digitalWrite(6, HIGH); digitalWrite(9, LOW); digitalWrite(10, LOW); }
if(modus==1 && moduson==1) { digitalWrite(6, LOW); digitalWrite(9, HIGH); digitalWrite(10, LOW); }
if(modus==2 && moduson==1) { digitalWrite(6, LOW); digitalWrite(9, LOW); digitalWrite(10, HIGH); }
if(modus==3 && moduson==1) { digitalWrite(6, HIGH); digitalWrite(9, HIGH); digitalWrite(10, HIGH); } if(modus==4 && moduson==1) { if(millis() - previousStrobe > strobeinterval) { if (ledState == LOW) { digitalWrite(6, HIGH); digitalWrite(9, HIGH); digitalWrite(10, HIGH); ledState = HIGH; } else{ digitalWrite(6, LOW); digitalWrite(9, LOW); digitalWrite(10, LOW); ledState = LOW; } previousStrobe=millis(); } }
if(modus==5 && moduson==1) { if(millis() - previousFade > fadeinterval) {
if(phase==1) { redVal=redVal-1; greenVal=greenVal+1; if(redVal==0) { phase=2; } }
if(phase==2) { greenVal=greenVal-1; blueVal=blueVal+1; if(greenVal==0) { phase=3; } }
if(phase==3) { blueVal=blueVal-1;
redVal=redVal+1; if(blueVal==0) { phase=1; } } // we do "255-redVal" instead of just "redVal" because the // LEDs are hooked up to +5V instead of Gnd analogWrite(6,redVal); // Write current values to LED pins analogWrite(9,greenVal); analogWrite(10,blueVal); previousFade=millis();
} }
if(modus==6 && moduson==1) { analogWrite(6, redmix); analogWrite(10, bluemix); analogWrite(9, greenmix); } }
hierbei wird im ersten teil das Signal empfangen und ausgewertet, und dementsprechent modus auf den gewünschten wert gesetzt und im 2. Teil wird je nach Modus die RGB angesteuert.
|
|
|
|
|
27
|
International / Deutsch / Re: 150 RGBs simple Frage (hoffentlichlich)
|
on: October 12, 2011, 08:28:48 am
|
Super mit der beschreibung kann ich schon mehr anfangen  meine LEDS haben gemeinsame Kathode (-) Aber die gegen andere Austauschen ist kein Problem. Ich brauche demnach 3 von den Mosfet, für rot grün und blau jeweils?
|
|
|
|
|
29
|
International / Deutsch / 150 RGBs simple Frage (hoffentlichlich)
|
on: October 12, 2011, 05:36:22 am
|
|
Hallo Leute, ich habe mir in den letzten einen RGB controler gebastelt, den ich über IR ansprechen kann, genauer gesagt mit meiner Fernsehsteuernung. Es funktioniert auch alles wunderbar und meine kleine 20 RGB Leiste geht alle Programme durch und so weiter. Allesdings möchte ich diesen Controler auch nutzen um meine Deckenbeleuchtung zu steuern, da mir der gekaufte controler nicht wirklcih gefällt. Diese Beleuchtung verfügt allerdings über 150 RGB LEDs und braucht somit eine ganze menge mehr Ampere als der Arduino liefern kann. Ich weiss ich könnte TLC 5940 benutzen aber es muss doch eine einfacherer Lösung geben, bei der ich nicht mein gesammtes Script umschreiben muss. vielen dank schonmal max
|
|
|
|
|
30
|
International / Deutsch / Re: Stromversorgung Problem
|
on: May 27, 2011, 07:46:46 am
|
|
nein hat es nicht ^^ ist so ein uraltes nokia. Also ich habe ein Wii Netzteil an 4 stromwandeler parallel angeschlossen, damit der bis zu 4 A liefern kann. am Andern ende habe ich also 5V (habs nachgemessen). Wenn ich den Arduino (den selbstgebastelten) dort anschliesse, funktieniert es nicht. Wenn ich es über USB über den umweg des unbestückten boards mache, funktioniert es.
|
|
|
|
|