The Arduino IDE and build environment is not very smart. And I always configure the IDE to never edit any files as I prefer to use my own editor (vim). I would really love to be able to set up a Makefile that would compile against the Arduino libraries. Would be a lot faster as object files would only recompile when necessary. I looked into this once. I'll have to revisit it.
I really like the Arduino abstractions. I like the simple setup() and loop() thing, and I like the pin abstractions. Real AVR C involves selecting ports and pins. I prefer the Arduino way where the pins can be accessed by number (the mapping is set in the hardware definition files, which is different between different types of boards). Provided you know how the ports are wired, you can basically use Arduino's programming language and libraries on any Atmel chip, and some Arm chips. I have a little board called the Teensy and it has a different bootloader than Arduinos do, but there is a plugin for the Arduino IDE which is convenient. I've also programmed AtTiny's before using the Arduino IDE. Requires an AVR programmer though as the Attiny has no boot loader.
By the way, BasicCoder, my little Arduino LCD screen project ended in a sort of failure. I couldn't get my code to run fast enough to keep up with the commands coming in over serial. I kept missing bytes and overflowing the little uart buffer. It should work, though. I just need to optimize the routines, but that will have to wait until the GPS unit is not being used.
FreeBasic and Arduino communication
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: FreeBasic and Arduino communication
However you can apparently still program at a "lower" level if you like.caseih wrote:Real AVR C involves selecting ports and pins. I prefer the Arduino way where the pins can be accessed by number (the mapping is set in the hardware definition files, which is different between different types of boards).
https://balau82.wordpress.com/2011/03/2 ... in-pure-c/
The LED blinking example compiled using the Arduino IDE and ran ok when uploaded to an Arduino board.
Could you not simply make the serial connection cord longer?By the way, BasicCoder, my little Arduino LCD screen project ended in a sort of failure.
Code: Select all
' +---------+ +----------+
' | display | serial connection | GPS |
' | |<---------------------->| |
' | buttons | cord | RECORDER |
' +---------+ +----------+
.
Re: FreeBasic and Arduino communication
Yes, Arduino is really just normal C++ with a nice abstraction library. You can still access things the normal way if you want to. Though you do have to work with setup() and loop(). Arduino takes care of main.
I thought about just running a cord and mounting the little screen and buttons where I wanted it. But in the end I decided to keep it all in one unit so I could move it to other vehicles easily (self-contained). I figure I can mount the whole unit in a convenient enough spot. Decoding the serial protocol was a fun project though.
I thought about just running a cord and mounting the little screen and buttons where I wanted it. But in the end I decided to keep it all in one unit so I could move it to other vehicles easily (self-contained). I figure I can mount the whole unit in a convenient enough spot. Decoding the serial protocol was a fun project though.