|
#91
|
||||
|
||||
|
Ebay....but they have all just raised prices in the last 2 days...did the finance market crash again? So the cheapest now is $10.50 for me... ended up paying $12 for an Australian seller, so hopefully it will come this week instead of 2 weeks.
__________________
2008 DL650 |
| Sponsored Links | ||
Advertisement | ||
|
#92
|
||||
|
||||
|
Quote:
__________________
2008 DL650 |
|
#93
|
||||
|
||||
|
It is a bit off topic, but since Philip Kuntz asked.
I did some research. It is easy to calculate a magnetic north using a the X and Y components of a magnetometer. The Z component is not needed (the inclination angle). But: 1. This solution is very sensitive to tilts. The magnetometer needs to be leveled to be accurate. I don't think it is a good solution for a motorcycle. 2. Magnetic north is not geographic north. There is a discrepancy between these north, and it is varying for each geographical location. One can buy or build a compass that compensates for the tilt, but an accurate compass needs to know the location as well (via GPS, manual preset or some other method) for the declination angle. See also: http://www51.honeywell.com/aero/comm...netometers.pdf
__________________
Stromputer - A V-Strom Computer and display - Now taking orders for V3 PCB --------------------------------- 2013 Northeast V-Strom Rally! 2011 DL650 ABS ( "White Pearl") ![]() -------------------- Stromtrooper Wiki! Last edited by BigMan73; 12-26-2012 at 09:37 PM. |
|
#94
|
||||
|
||||
|
Today I tried again and I can communicate with the fried Arduino again
I got my LCD today too Do you know of any links to tutorial sites to learn the basics (example : "Hello World")? I have spent the last hour looking and cannot find any tutorials for the nano. This is the Nano schematic - http://arduino.cc/en/uploads/Main/Ar...0Schematic.pdf If not, do you have the knowledge to confirm with the Nano; 1) Which are the I2C pins? Is it Pin A4 & A5 or D0 & D1 (or is there a way I can work it out?) 2) Do I need libraries or is the built in one sufficient? Cheers Chris
__________________
2008 DL650 |
|
#95
|
||||
|
||||
|
Quote:
If you build the LM2940 12V->5V converter it work with your 'toasted' board since you will be bypassing the on board regulator. No need to throw it away. I don't know what LCD you have. Can you post the exact ebay site you bought it from? Mine is NHD. This is the most important question. Arduino is using SDA (data line) and SCL (clock line) for I2C communications. On the Nano: I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library (documentation on the Wiring website). Arduino - ArduinoBoardNano (RTFM, Dude.. )I'm using LCDi2cNHD library, but for some reason I can't get to its page.. Author may have stopped support for it. You can find the source code under Stromputer SVN repository (IF you have NHD) Liquid_Crystal I2C Library might be good for your LCD: Arduino LiquidCrystal_I2C library V2.0 Your code should be similar to this example: https://bitbucket.org/fmalpartida/ne...stal/wiki/Home PHP Code:
Lincomatic's DIY Blog | electronics, 3d printing, hacking, etc Or look here: (some broken links) http://playground.arduino.cc/Code/LCDi2c Once again, find out what LCD you have, the ebay pages typically post an example code
__________________
Stromputer - A V-Strom Computer and display - Now taking orders for V3 PCB --------------------------------- 2013 Northeast V-Strom Rally! 2011 DL650 ABS ( "White Pearl") ![]() -------------------- Stromtrooper Wiki! Last edited by BigMan73; 12-26-2012 at 11:27 PM. |
|
#96
|
||||
|
||||
|
thanks Bigman. Not sure how I missed that bit on the page you linked to for pin 4 and 5. I had that page open earlier :s
Is NHD the type of board you have or the brand? The LCD I got is a YwRobot LCM1602 IIC V1; eBay Australia: Buy new & used fashion, electronics & home d and as per your suggestion, it did have sample code, which started with LCDi2cNHD . So I am guessing the LCDi2cNHD library you linked to will work. #include <Wire.h> #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); //set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print("www.b2cqshop.com"); lcd.setCursor(0, 1); lcd.print("Voltage: "); lcd.setCursor(13, 1); lcd.print("V"); } void loop() { int val; float temp; val=analogRead(0); temp=val/4.092; val=(int)temp;// lcd.setCursor(9, 1); lcd.print(0x30+val/100,BYTE); lcd.print(0x30+(val%100)/10,BYTE); lcd.print('.'); lcd.print(0x30+val%10,BYTE); delay(100); }
__________________
2008 DL650 |
|
#97
|
||||
|
||||
|
I spent about 5 hours stuffing around and have still not got the display working.
It powers on, backlight on, and shows blocks of squares. it seems quite a few people have had issues with this particular model (YwRobot LCM1602 IIC V1) This person claims to have it working, but I did it all as he said (both trying the code on his website and the one in the video). µCI – Arduino Serial LCD | µ Control It I have now tried the following libraries using both the built in "Hello World" for each library, and trying various code from the net. 1) LiquidCrystal - the one standard with Arduino 1.03 2) LiquidCrystal_I2C1602V1 3) LiquidCrystal_V1.2.1 - https://bitbucket.org/fmalpartida/ne...stal/downloads 4) LiquidTWI2-v110 - Lincomatic's DIY Blog | electronics, 3d printing, hacking, etc 5) LiquidCrystal_I2C 6) LCDi2cNHD one of the lines that is confusing me is ; LiquidCrystal lcd(12, 11, 5, 4, 3, 2); and LiquidCrystal lcd(0x27,16,2); The first appears to be for if you dont have I2C, yet it is in many of the "Hello World" examples for use with I2C. If you have any advice, please let me know. Otherwise I will keep pondering. Attached is a fritzing schematic I am using. I have tried it with and without the pull-up resistors (10k). cheers Chris
__________________
2008 DL650 |
|
#98
|
||||
|
||||
|
Quote:
The line "LiquidCrystal lcd(12, 11, 5, 4, 3, 2);" sets up the LCD interface pins. Defines what is shared clock and shared data, etc. It appears you have this correct. The line "LiquidCrystal lcd(0x27,16,2);" defines the display format and the I2C address. You are using a 16x2 display. The I2C address is set at 0x27 (that is decimal 39). You cannot change this. It is set by the factory. Regarding the resistors.... Until I got to the end of you post I had these ideas 1) bad display (common for the eBay China gear), 2) bad valve or improper placement of the I2C shared data (SD) and shared clock (SC) resistors. 3) Ardiuno is pushing data out too fast for the cheap China display. 4) maybe you cooked a critical part of your Arduino earlier. There is plenty of demo code that saw and it was basically exactly what you have. I say your code is solid. The things I would try: - Verify the 10K values (remove them and use an ohm meter) on the I2C and double check the connections for the SD and SC. For I2C to work the devices on the bus must pull SD and SC low. Remove these and nothing works. Maybe try 20K just for the fun of it. - Every micro I have worked with allows you to adjust down the system clock. This is usually used in low power applications. I don't know the Arduino command for this, but I would give it a try. The China LCD may be slightly out of spec and just not be able to handle the data/clock as fast. - Lastly, scrap the Big project and build mine. Actually, that's a joke. You are experiencing two things; the learning process and open source. Hang in there! On last suggestion, join the Arduino forum. You will get more eyes looking into your problem and they wil be experienced eyes. Good luck. |
|
#99
|
|||
|
|||
|
I wish you guys would get this thing finished and then make some for the rest of us less electronically abled dirt dweebs.
|
|
#100
|
||||
|
||||
|
Hey Big Man! I love your idea and would buy one if you got them to the point to where they were fairly plug and play. Please keep me posted!
|
| Sponsored Links | |
Advertisement | |
![]() |
| Thread Tools | |
| Display Modes | |
|
|