MultiWiiKopter-Konfigurationsprogramm für Arduino

Benutzeravatar
Crizz
Beiträge: 27061
Registriert: 12.04.2007 17:44:22
Wohnort: Haiger
Kontaktdaten:

#766 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Crizz »

hey, that´s nice - could use my ETree LCD for this. Does anybody have a complete wiring diagram incl. Joystick / Buttons e.g. ? Woudl be nice if Yacco could match it to his version ( even i was thinking about using my Sparkfun 3-wire LC , but if this is easier to add i will use the ETree Panel )
_________________________________________________________________________________
"Leben ist das, was passiert, während du etwas ganz anderes planst" ... ( John Lennon )

! REVOLECTRIX-Distributor ! -> Ladeequipment / Akkus : -> HaDi-RC.de

Alle Projektberichte für den VTH-Verlag als PDF zum Download unter http://www.CrizzD.de !
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#767 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

Done. :)

Danal, please check if everything is still working, I simply copied your block of code to the latest version and added some comments.

Crizz, apparently the PowerPanel is connected via the I2C Interface/Ports.
Zuletzt geändert von yacco am 23.06.2011 17:13:52, insgesamt 3-mal geändert.
Ciao, Arnd
Danal Estes
Beiträge: 4
Registriert: 20.06.2011 04:15:30

#768 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Danal Estes »

Yacco,

Three things:

1) Very, very close, but not quite working yet. There are a few other blocks of code, all marked with #ifdef LCD_ETPP. Note that a couple of them also required changes to nearby #ifdef/else/endif to allow for three choices (instead of just two, via the else). Once these blocks are also changed, it works fine.

You could either run a diff to the 12.05.2011 V2.9, or just do a Ctrl+F find on "LCD_ETPP" and look at the code blocks. There are about 4 or 5 beyond the ones you already have.

2) In function "void waitForKeyUp()", change lcd.noCursor() and lcd.noBlink() to lcdNoCursor() and lcdNoBlink(). There are not #ifdefs around this code because it works for all LCDs after this change.

3) My name got mispelled... it is in there a couple of times as "Daval" with a "V". It should be "Danal" with an "N". :)



Crizz,

The Power Panel LCD attaches via 4 wires. Color codes and pins are in the sketch. To make it easy, I'll repeat them here:

Code: Alles auswählen

//   White wire  to Ground
//   Red wire    to +5V
//   Yellow wire to A4
//   Brown wire  to A5
Thanks!

Danal
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#769 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

Mist, war doch zu spät gestern...

Sorry for the mispelling, Danal... :oops: Greetings to Texas. :D
Ciao, Arnd
Benutzeravatar
calli
Beiträge: 6970
Registriert: 22.11.2004 12:40:52
Wohnort: Berlin
Kontaktdaten:

#770 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von calli »

yacco hat geschrieben:Naja, das MultiWiiConf ist eine .exe
Nö, da ist auch der "Source" bei wie sich das für eine OS Geschichte gehört.

MultiWiiConf1_7.pde das aber NICHT in die Arduino_22 IDE laden sondern vorher Processing installieren: http://processing.org/

Carsten
Status: Flugtagebuch (grün=ok, orange=in Arbeit, rot=groundet)
Setup: Humingbird, Trex500ESP/FBL, WiiCopter, PZ Bf109, Easy Glider, Nuris, MCPx, MQX, Sim, Evo9 M-Link, DMFV
Benutzeravatar
-Didi-
Beiträge: 13124
Registriert: 14.02.2006 11:51:52
Wohnort: Kiel

#771 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von -Didi- »

Crizz hat geschrieben:hey, that´s nice - could use my ETree LCD for this. Does anybody have a complete wiring diagram incl. Joystick / Buttons e.g. ? Woudl be nice if Yacco could match it to his version ( even i was thinking about using my Sparkfun 3-wire LC , but if this is easier to add i will use the ETree Panel )
Ich habe hier auch seit langem ein ungenutztes ETree LCD Panel rumliegen.
Wäre klasse, wenn es dafür eine umfassende Didi-Bastelanleitung für DAUs geben würde, weil dann baue ich mir damit auch was zusammen.
Prima Plan!!! *dabei bin*
Plus an Masse, das knallt klasse! :-)


zu Luft: Logo 600SE, TDR, Blade 130x, mcpx V1 BL & V2 stock
Knuffel V2, Corsair, Mentor als Wasserflugzeug, Turn Left, Impressivo, Knurri, Hexa-Copter, Agrumi-Nanowii-X und Nanowii-Y6, Wilga im Aufbau
zu Land: E-Maxx 16,8V BL
zu Wasser: NoStep 2, Jetböötchen "Tear Into", MHZ Mystic 114 im Aufbau

Powerd by...GensAce
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#772 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

Seems to work now... great Job, Danal. :thumbleft:
etpp.jpg
etpp.jpg (48.37 KiB) 1434 mal betrachtet
PS: you can't use #define STATUS_LEDS or you have to change the default ports.
Ciao, Arnd
Danal Estes
Beiträge: 4
Registriert: 20.06.2011 04:15:30

#773 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Danal Estes »

Excellent! Very cool to see that working on someone else's hardware.


Just a few tweaks:

1) The #ifdefs in setup still include the LiquidCrystal library, even when LCD_ETPP is defined. This causes the memory footprint to be larger than necessary.

I replaced this:

Code: Alles auswählen

#ifndef SRLCD
  #include <LiquidCrystal.h>
  LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // rs, enable, d4, d5, d6, d7
  #define INIT_LCD lcd.begin(16, 2); 
#else
  #include <ShiftRegLCD.h>
  ShiftRegLCD lcd(3, 2, 4, 2);       // (Datapin, Clockpin, Enablepin or TWO_WIRE [, Lines [, Font]]])
  #define INIT_LCD                   // no begin in ShiftRegLCD...
#endif
#ifdef LCD_ETPP
  #define INIT_LCD i2c_init();  i2c_ETPP_init();
#endif
With this:

Code: Alles auswählen

#if ! ((defined(SRLCD) || defined(LCD_ETPP)))
  #include <LiquidCrystal.h>
  LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // rs, enable, d4, d5, d6, d7
  #define INIT_LCD lcd.begin(16, 2); 
#endif
#ifdef SRLCD
  #include <ShiftRegLCD.h>
  ShiftRegLCD lcd(3, 2, 4, 2);       // (Datapin, Clockpin, Enablepin or TWO_WIRE [, Lines [, Font]]])
  #define INIT_LCD                   // no begin in ShiftRegLCD...
#endif
#ifdef LCD_ETPP
  #define INIT_LCD i2c_init();  i2c_ETPP_init();
#endif
I believe this works for the three scenarios of default library (neither defined), defining only SRLCD, and defining only LCD_ETPP. Resulting sizes before the ifdef change were 28240 and 28270 (i.e. gain of 30 bytes) for defining LCD_ETPP, after these ifdef changes, sizes are 28240 and 27318 (savings of 922 bytes).

2) Associated with change (1) is a slight change to replace library lcd.noBlink and lcd.noCursor calls with sketch functions. These are down in waitForKeyUp() and serialWrite().

And, last, I found one ifdef where LCD_ETPP had been missspelled LCD_EGPP. This was in the "Cryptic compiler options" area.




Attached for your convenience is a zip with these three minor changes installed. Thanks again for allowing me to contribute.
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#774 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

I'm already preparing a version which supports the Sparkfun Serial LCD, so I did the patches on this version.

(Edit: Attachment deleted, see newer version below)
Zuletzt geändert von yacco am 25.06.2011 14:58:48, insgesamt 1-mal geändert.
Ciao, Arnd
Danal Estes
Beiträge: 4
Registriert: 20.06.2011 04:15:30

#775 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Danal Estes »

Looks perfect. Sizes look right, everything.

I will physically test this evening.
Dodger
Beiträge: 102
Registriert: 25.03.2011 17:35:03

#776 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Dodger »

Hi,
hmm, mal ne Frage am Rande. Seh ich das richtig, dass das EagleTree-Powerpanel aktuell die beste Lösung für jemanden wäre der keine Platinen ätzen kann und auch nicht unbedingt ne Lochraster-Platine mit fliegender Verkabelung haben will ? Scheint ja fast plug&play zu sein. Oder hab ich da noch ne andere Lösung in dem langen Thread hier übersehen ?

Grüße & Danke,
Frank
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#777 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

Moin Frank,

nö, das seh ich nicht so, die einfachste Lösung dürfte ein Arduino Uno Board mit aufgestecktem DFRobot Keypad Shield sein. Dann brauchst du dir keine Eingabetasten oder einen Joystick zusammenbasteln, und billiger als das Powerpanel ist es auch.

Aber da sich ja schon ein paar eigene Platinen geätzt haben, vielleicht hat ja jemand noch eine auf Vorrat, die er abgeben kann?

Wieviele LCD Configs gibt es jetzt überhaupt? Von den Downloads her müßten es schon um die hundert sein.
Ciao, Arnd
Benutzeravatar
yacco
Beiträge: 4728
Registriert: 15.02.2009 19:27:59
Wohnort: Aßlar

#779 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von yacco »

Ich such noch den "Danke"-Button, speedy :D
Ciao, Arnd
Agrumi
Beiträge: 7861
Registriert: 19.08.2004 22:23:24

#780 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino

Beitrag von Agrumi »

yacco hat geschrieben:Ich such noch den "Danke"-Button, speedy :D
ich hätte einen für dich. :mrgreen: :wink:

Bild
Das Närrischste ist, dass jeder glaubt überliefern zu müssen, was man gewusst zu haben glaubt. (J.W. von Goethe)
Antworten

Zurück zu „Allgemeines“