Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
#include "hardware.h"// Initialise the hardwarevoid appInitHardware(void) { initHardware();}// Initialise the softwareTICK_COUNT appInitSoftware(TICK_COUNT loopStart){ return 0;}// This is the main loopTICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) { // -------- Start Sparkfun serLCD------- // You can send commands to sparkfun20x4LCD by using the commands in _display_common.h displayGoto(&sparkfun20x4LCD,0,1); // To set rprintf to go to sparkfun20x4LCD then rprintfInit( displayGetWriter(&sparkfun20x4LCD)); rprintf("hello world"); return 0;}
It works perfectly fine, displays text correctly, etc . . .until I turn on the backlight . . . and then it turns into a stubborn inconsistent dysfunctional child.
The displays were working fine yesterday. I turned everything on today, making no changes, yet the baud rate changed to some other unknown rate. Trying to fix it, suddenly the backlight turns on again, although I issued no command to do so. An unknown baud rate + a backlight that breaks commands = I give up.
#include "hardware.h"// Initialise the hardwarevoid appInitHardware(void) { initHardware();}// Initialise the softwareTICK_COUNT appInitSoftware(TICK_COUNT loopStart){ return 0;}// This is the main loopTICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) { // -------- Start Sparkfun serLCD------- // You can send commands to display by using the commands in _display_common.h // For example to move the cursor to position 0 of line 1 (note positions start at 0) then: displayGoto(&display,0,1); // To set rprintf to go to display then rprintfInit( displayGetWriter(&display)); // You can now use any rprintf commands to output character data to the display rprintf("hello world"); // -------- End Sparkfun serLCD------- return 0;}
ps this is why i'm a mechanical engineer. i suck at electronics!!!@#$!#@!3
and the backlight is toggling every 5 seconds
the only reason i want to get this screen working is because i'm used to debugging/displaying servo position/IR value/battery level/and pretty much everything on one and it helps a ton. However, teraterm is handy too it just sux having to disconnect from it every time i upload a new program and playing musical-windows if you know what i mean.
This is why I use a hardware programmer and not the bootloader . . .
i turns out that you have to physically remove all power from the screen and then print to it. appearently the axon was still suppling it with ~2v even when powered off (from caps) which i guess screws up the screen.
do you have to turn off and on the power manually then flashing with a programmer, or does it take care of that for you?
Quotei turns out that you have to physically remove all power from the screen and then print to it. appearently the axon was still suppling it with ~2v even when powered off (from caps) which i guess screws up the screen.wait . . . what?
As for looking at the code then try looking at: Displays/Sparkfun/serLCD.c
EDIT: As an after thought you could always change the display to be on UART1 (ie the usb) and then use Teraterm etc to view what webbotlib is sending to the display. Bear in mind that there are lots of non-ascii characters so you could show them in hex, or similar, on your terminal.
I'll send you a new libWebbot-ATMega640.a - let me know via this forum if it fixes your issue.
So find out what you display is called - lets assume its 'myLCD' then the code is:-displayBacklight( &myLCD, TRUE); // to turn on the light , ordisplayBacklight( &myLCD, FALSE); // to turn off the light
( +1 help beg )
Thnx for being a guinea pig !
My next project is getting my ps2 controller working with the axon II; do you need another guinea pig?
wow , i guess ill be doing that project alot sooner then. I noticed that project designer also has the ps2 controller; you know you guys are spoilers right?
Yep - well it would be in both - I designed and wrote all of WebbotLib, Project Designer, Board Designer, Gait Designer etc - hence its all tied together. Admin invents the hardware you buy from him, whereas I independently invent the software to support his boards, and others, which I release for free.
Hey, I lost a lot of hair heavily debugging your earlier versions, and much of my code/ideas was assimilated into WebbotLib