Seite 52 von 81
#766 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 22.06.2011 23:02:42
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 )
#767 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 00:02:48
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.
#768 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 03:28:18
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
#769 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 09:16:17
von yacco
Mist, war doch zu spät gestern...
Sorry for the mispelling, Danal...

Greetings to Texas.

#770 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 10:11:59
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
#771 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 10:23:40
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*
#772 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 11:12:22
von yacco
Seems to work now... great Job, Danal.

- etpp.jpg (48.37 KiB) 1439 mal betrachtet
PS: you can't use #define STATUS_LEDS or you have to change the default ports.
#773 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 16:57:30
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.
#774 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 17:12:45
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)
#775 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 23.06.2011 21:57:05
von Danal Estes
Looks perfect. Sizes look right, everything.
I will physically test this evening.
#776 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 24.06.2011 09:41:32
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
#777 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 24.06.2011 09:56:42
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.
#778 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 24.06.2011 19:07:04
von speedy
Mach doch nen Zählthread auf.
MFG
speedy
#779 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 24.06.2011 19:53:43
von yacco
Ich such noch den "Danke"-Button, speedy

#780 Re: MultiWiiKopter-Konfigurationsprogramm für Arduino
Verfasst: 24.06.2011 19:59:52
von Agrumi