Problem mit Code vom TB3

Hallo zusammen, ich brauche wieder mal Hilfe. XD
Ich versuche den Code vom TB3 (eMotion TB3 Black) zum laufen zu bekommen. Ich verwende Arduino mega 2560 und ein LCD 2x16 mit serial Modul von Sparkfun. Das Display funktioniert an einem Uno ohne Probleme. Schliesse ich es an den Mega an, wird es erkannt und zeigt auch Schrift aber es wird nur ca. das halbe Display neu geschrieben. Ich habe nun gelesen, es gibt verschieden Baudrate für das Modul. Wie und wo kann ich es ändern? Muss es geändert werden? Ich finde auch keine Adresse für den EEprom, habe nun schon einen verbaut aber weiß nicht ob er erkannt wird. Oder wird der interne EEprom verwendet?
Bevor ich alles inn ein Gehäuse baue , möchte ich es erst auf dem Steckbrett versuchen. Ich habe auch einen Wii Nunchuk (3. Anbieter) angeschlossen. Die Tasten C - Z funktionieren aber der Rest nicht. Im Menü kann ich nicht nach oben oder unten Scrollen.
Wer kann mir helfen und weiß woran es liegt. :frowning:

Der ganze Code gibt es unter: http://emotimo.com/wp-content/uploads/2013/10/eMotimo_TB3_BLACK_R1_1_108.zip

Hier ist nur ein Auszug.

MfG Marco

 This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.


  

 =========================================
Main Program
 =========================================
 
*/
#include <Wire.h>
#include <SoftwareSerial.h> 
#include <EEPROM.h>
#include <avr/interrupt.h>
#include "WiiNunchuck3.h"
#include "NHDLCD9.h"  //BB for LCD

NHDLCD9 lcd(4,2,16); // desired pin, rows, cols   //BB for LCD

char lcdbuffer1[16];

prog_char setup_0[] PROGMEM = "Setup Complete";   
prog_char setup_1[] PROGMEM = "TB3BlackR1.1.108";
prog_char setup_2[] PROGMEM = "Connect Joystick";
prog_char setup_3[] PROGMEM = "C-Next Z-Go Back";
prog_char setup_4[] PROGMEM = "C-Use Stored";
prog_char setup_5[] PROGMEM = "Z-Reset";
prog_char setup_6[] PROGMEM = "Params Reset";
prog_char setup_7[] PROGMEM = "Low Power"; //free
prog_char setup_8[] PROGMEM = "Move to Start Pt";
prog_char setup_9[] PROGMEM = "Start Pt. Set";
prog_char setup_10[] PROGMEM = "Move to Point"; //free
prog_char setup_11[] PROGMEM = "Moving to stored";
prog_char setup_12[] PROGMEM = "end point";
prog_char setup_13[] PROGMEM = "Confirm or Move";
prog_char setup_14[] PROGMEM = "C-Next";
prog_char setup_15[] PROGMEM = "Move to End Pt.";
prog_char setup_16[] PROGMEM = "End Point Set";
prog_char setup_17[] PROGMEM = "Set Sht Interval";
prog_char setup_18[] PROGMEM = "Intval:   .  sec";
prog_char setup_19[] PROGMEM = " Ext.Trig";
prog_char setup_20[] PROGMEM = " Video   ";
prog_char setup_21[] PROGMEM = "Interval Set";
prog_char setup_22[] PROGMEM = "Set Static Time";
prog_char setup_23[] PROGMEM = "Stat_T:   .  sec";
prog_char setup_24[] PROGMEM = " Video   ";
prog_char setup_25[] PROGMEM = "Static Time Set";
prog_char setup_26[] PROGMEM = "Set PreFire Time";
prog_char setup_27[] PROGMEM = " Pre_T:   .  sec";
prog_char setup_28[] PROGMEM = "Prefire Time Set";
prog_char setup_29[] PROGMEM = "    Set Ramp";
prog_char setup_30[] PROGMEM = "Ramp:     Frames";
prog_char setup_31[] PROGMEM = "Ramp Set";
prog_char setup_32[] PROGMEM = "Set Move";
prog_char setup_33[] PROGMEM = "Duration";
prog_char setup_34[] PROGMEM = "H:MM:SS";
prog_char setup_35[] PROGMEM = "Duration Set";
prog_char setup_36[] PROGMEM = "Set Static Lead";
prog_char setup_37[] PROGMEM = "In/Out Frames";
prog_char setup_38[] PROGMEM = "In      Out";
prog_char setup_39[] PROGMEM = "Lead Frames Set";
prog_char setup_40[] PROGMEM = " Going to Start";
prog_char setup_41[] PROGMEM = "Review and";
prog_char setup_42[] PROGMEM = "Confirm Setting";
prog_char setup_43[] PROGMEM = "Pan Steps:";
prog_char setup_44[] PROGMEM = "Tilt Steps:";
prog_char setup_45[] PROGMEM = "Cam Shots:";
prog_char setup_46[] PROGMEM = "Time:";
prog_char setup_47[] PROGMEM = "Ready?";
prog_char setup_48[] PROGMEM = "Press C Button";
prog_char setup_49[] PROGMEM = "Program Running";
prog_char setup_50[] PROGMEM = "Waiting for Ext.";
prog_char setup_51[] PROGMEM = "LeadIn";
prog_char setup_52[] PROGMEM = "RampUp";
prog_char setup_53[] PROGMEM = "Linear";
prog_char setup_54[] PROGMEM = "RampDn";
prog_char setup_55[] PROGMEM = "LeadOT";
prog_char setup_56[] PROGMEM = "Finish";
prog_char setup_57[] PROGMEM = "Center Joystick";
prog_char setup_58[] PROGMEM = "Program Complete";
prog_char setup_59[] PROGMEM = " Repeat Press C";
prog_char setup_60[] PROGMEM = "Battery too low";
prog_char setup_61[] PROGMEM = "  to continue";
prog_char setup_62[] PROGMEM = "Pause ";
prog_char setup_63[] PROGMEM = "Point X Set";
prog_char setup_64[] PROGMEM = "Using Set Params";
prog_char setup_65[] PROGMEM = "UpDown  C-Select";
prog_char setup_66[] PROGMEM = "New   Point Move";
prog_char setup_67[] PROGMEM = "Enabled";
prog_char setup_68[] PROGMEM = "Disabled";
prog_char setup_69[] PROGMEM = "PowerSave";
prog_char setup_70[] PROGMEM = "Always";
prog_char setup_71[] PROGMEM = "Program";
prog_char setup_72[] PROGMEM = "Shoot (accuracy)";
prog_char setup_73[] PROGMEM = "Shoot (pwr save)";
prog_char setup_74[] PROGMEM = "Aux Motor:";
prog_char setup_75[] PROGMEM = "Set Angle o'View";
prog_char setup_76[] PROGMEM = "C-Set, Z-Reset";
prog_char setup_77[] PROGMEM = "Pan AOV: ";
prog_char setup_78[] PROGMEM = "Tilt AOV: ";
prog_char setup_79[] PROGMEM = "   % Overlap";
prog_char setup_80[] PROGMEM = "Overlap Set";


PROGMEM const char *setup_str[] = {setup_0,setup_1,setup_2,setup_3,setup_4,setup_5,setup_6,setup_7,setup_8,setup_9,setup_10,
setup_11,setup_12,setup_13,setup_14,setup_15,setup_16,setup_17,setup_18,setup_19,setup_20,
setup_21,setup_22,setup_23,setup_24,setup_25,setup_26,setup_27,setup_28,setup_29,setup_30,
setup_31,setup_32,setup_33,setup_34,setup_35,setup_36,setup_37,setup_38,setup_39,setup_40,
setup_41,setup_42,setup_43,setup_44,setup_45,setup_46,setup_47,setup_48,setup_49,setup_50,
setup_51,setup_52,setup_53,setup_54,setup_55,setup_56,setup_57,setup_58,setup_59,setup_60,
setup_61,setup_62,setup_63,setup_64,setup_65,setup_66,setup_67,setup_68,setup_69,setup_70,
setup_71,setup_72,setup_73,setup_74,setup_75,setup_76,setup_77,setup_78,setup_79,setup_80};


//Global Parameters 
#define DEBUG 0//
#define DEBUG_MOTOR 0//
#define DEBUG_NC 0 //turn on for verbose logging of nunchuck
#define DEBUG_PANO 0
#define POWERDOWN_LV false //set this to cause the TB3 to power down below 10 volts
#define MAX_MOVE_POINTS 3

//Main Menu Ordering
#define MENU_OPTIONS  7

#define REG2POINTMOVE 0
#define REV2POINTMOVE 1
#define REG3POINTMOVE 2
#define REV3POINTMOVE 3
#define DFSLAVE       4
#define SETUPMENU     5
#define PANOGIGA      6


//Interval Options
#define VIDEO_INTVAL  2
#define EXTTRIG_INTVAL 3
//#define STOPMOT //not used

/
#define IO_2  2 // drives middle of 2.5 mm connector on I/O port
#define IO_3  3 // drives tip of 2.5 mm connector on I/O port
#define CAMERA_PIN  12 // drives tip of 2.5 mm connector
#define FOCUS_PIN   13 // drives  middle of 2.5mm connector
#define STEPS_PER_DEG  444.444 //160000 MS per 360 degees = 444.4444444
//end TB3 section

unsigned long build_version=10831; //this value is compared against what is stored in EEPROM and resets eeprom and setup values if it doesn't match
unsigned int  intval=20; //seconds x10  - used for the interval prompt and display
unsigned long interval = 2000; //calculated and is in ms
unsigned long camera_exp_tm    = 100; //length of shutter signal sent to camera
unsigned int  camera_fired     = 0; //number of shots fired
unsigned int  camera_moving_shots = 200; //frames for new duration/frames prompt
unsigned int  camera_total_shots= 0; //used at the end target for camera fired to compare against
unsigned int  overaldur=20; //seconds now for video only
unsigned int  prefire_time = 1; //currently hardcoded here to .2 second - prefire function not enabled.  this powerers up motor early for the shot
unsigned int  rampval=50;
unsigned int  static_tm=1; //new variable
unsigned int  lead_in=1;
unsigned int  lead_out=1;
unsigned int  start_delay_min=0;

/

Hat keiner eine Lösung? Das Display zeigt die rechte Seite auf der linken an. Es löscht auch nicht das ganze Display, somit vermischt es sich. Woran kann das liegen? Die Baudrate sollte bei beiden 9600 sein.
Bitte Hilfe :~ :~ :~ :~

MfG Marco

Wasn das fürn Display? Links? Wenn es ein normale Character Display wie in der Bucht zu finden ist, hat das defenitv nichts mit der Baudrate zu tun. Man kann 4Bit und 8Bit aktivieren, verbraucht doppelte an Leitung und ist nicht wirklich sichtbar schneller.

Hier der Link zum Adapter, funktioniert mit verschiedenen LCD gleich.

Man kann die Schrift lesen aber bei einem neuem Menüeintrag, wird der alte nicht gelösch, sondern nur teilweise überschrieben.

MfG Marco

Sparkfun hat ne menge von den Displsys

warum erst ein Paraleles umbauen?
kann ja sein das Dein Display und der Wandler nicht gut zusammenarbeiten und dies garkein problem für dem Atmega ist.
an welche Pins hast du denn das Display angeschlossen?

Dirk

Welche serielle Schnittstelle verwendest Du?
Kannst Du uns den gesamten Sketch geben?
Grüße Uwe

Hi , ich habe mir die LCD´s in USA bestellt und die funktionieren mit dem Code. Den ganzen code könnte ich anhängen, wenn ich wüsste wie :blush: (recht groß)
Der Code stammt nicht von mir und ändern? Da bin ich noch überfordert! Außerdem ist das LCD 1Wire.
Wenn ich das richtig verstanden habe, liegt es am LCD bzw. am PIC der verwendet wurde.
Wer eine Lösung hat, wäre ich dankbar. :smiley:

MfG Marco

beginner34:
Hi , ich habe mir die LCD´s in USA bestellt und die funktionieren mit dem Code. Den ganzen code könnte ich anhängen, wenn ich wüsste wie :blush: (recht groß)
Der Code stammt nicht von mir und ändern? Da bin ich noch überfordert! Außerdem ist das LCD 1Wire.
Wenn ich das richtig verstanden habe, liegt es am LCD bzw. am PIC der verwendet wurde.
Wer eine Lösung hat, wäre ich dankbar. :smiley:

MfG Marco

Kode anhängen:
Unterhalb des Editorfenster steht "additional Options...." undda kannst Du bis zu 4 Files mit gesamtgröße 4MB anhängen.
Grüße Uwe

Hi, hier ist der Code. Ich hoffe es hat funktioniert. XD

MfG Marco

NHDLCD9.cpp (3.85 KB)

eMotimo_TB3_BLACK_R1_1_108.ino (47.3 KB)

NHDLCD9.h (3.05 KB)

in nhdlcd9.h
wird erwehnt das da ein NewHeaven Design Serial LCD benutzt wird.