Wiring Forum
Programming Questions & Help >> Library writers >> Arduino to Wiring Lib conversion

Message started by Zap on 11/22/10 at 11:13:56

Title: Arduino to Wiring Lib conversion
Post by Zap on 11/22/10 at 11:13:56
Is there a procedure somewhere that explains what is involved in converting an arduino lib to wiring?

Thanks Zap

Title: Re: Arduino to Wiring Lib conversion
Post by barragan on 11/22/10 at 15:14:09
hi Zap, first thing is to try it, you can drop the library inside your Documents/Wiring/library folder and start Wiring, it will be shown in the libraries menu. If the library uses standard API it should work perfectly fine, some minor conversions/adjustments have to be done if some very specific things tied to a microcontroller are found. Let me know if you need any help using/converting one.

Title: Re: Arduino to Wiring Lib conversion
Post by Zap on 11/23/10 at 00:41:39
Thanks for that. The first Arduino lib i've tried is the Liquidcrystal from 0021 - (but first I moved the Wiring liquidcrystal lib elsewhere). I need the arduino lib in place of the wiring one as I require 4 bit mode (even though I'm testing the lib in 8 bit mode at present)
It compiles & uploads OK but only puts garbled characters on the display. (display works fine with the wiring lib)
The arduino lib uses a different set up, and the sketch i'm using to set up either is below, commenting out the relevant line when I swap lib's

// LiquidDisplay for wiring object with R/S, R/W and E on pins 48,49,50 and data pins on port 0 , 
//LiquidCrystal myDisplay = LiquidCrystal(48,49,50,0);

//for arduino lib LiquidCrystal(rs, rw, enable, d1, d2, d3, d4, d5, d6, d7)
LiquidCrystal myDisplay = LiquidCrystal(48,49,50,1,2,3,4,5,6,7,8);

Thanks again if you can help with this,, Zap.

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.