Hi,
I have a Arduino UNO attached to a PC, which I use Norman's excellent book to programme the Arduino ia the USB connection.
The book details programming the Arduino by C/C++ programming with a pre-written libraries. Could an Arduino be programmed from QPC2 using C68. This would mean that a Arduino Library would have to be written.
There is an older Arduino S3v3 R2, based on an 8 Bit Atmel 2486 or ATmega8, OK this have less meory available, but has a standard serial port, which can be connected to a QL, Q68. Is this worth pursuing?
The PCBs are open source and should npot cost too much to make, if there is any interest.
QL Arduino
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
- NormanDunbar
- Forum Moderator
- Posts: 2470
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: QL Arduino
Hi Derek,
A lot of the Arduino language is C++ based, so unless someone msnages to convert it to C68, in C mode, I would think it unlikely.
The Serial interface, for example, the features to "print" and "println" descend from the "printable" base class, and the various "read" functions descend from the "stream" base class, which printable also descends from. Multiple inheritance.
Even worse, in C++, the ability to declare many class functions with the same name, has been used to allow different data types to be "print"ed.
Same "println" function name, different data types as parameters. In C (or C68) those would all be differently named.
I am however, very glad to hear that you have found my bookto be useful. Thank you very much.
Cheers,
Norm.
A lot of the Arduino language is C++ based, so unless someone msnages to convert it to C68, in C mode, I would think it unlikely.
The Serial interface, for example, the features to "print" and "println" descend from the "printable" base class, and the various "read" functions descend from the "stream" base class, which printable also descends from. Multiple inheritance.
Even worse, in C++, the ability to declare many class functions with the same name, has been used to allow different data types to be "print"ed.
Code: Select all
byte byt = 'A';
int intt = 12345;
long lng = 1234567890L;
Serial.println(byt);
Serial.println(intt);
Serial.println(lng);
I am however, very glad to hear that you have found my bookto be useful. Thank you very much.
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QL Arduino
Hi Norm,
I am a little confused on how to programme the Arduino with C, when all the books that go beyond the Arduino IDE, use C++
I do not know how to use C++, well maybe I need to readvanothet book.
But can not do C++ on the QL.
I am a little confused on how to programme the Arduino with C, when all the books that go beyond the Arduino IDE, use C++
I do not know how to use C++, well maybe I need to readvanothet book.
But can not do C++ on the QL.
Regards,
Derek
Derek
- NormanDunbar
- Forum Moderator
- Posts: 2470
- Joined: Tue Dec 14, 2010 9:04 am
- Location: Buckie, Scotland
- Contact:
Re: QL Arduino
Hi Derek,
You are already using C++ -- every time you use Serial.print, or the Wire or EEPROM libraries etc.
It's not difficult, most of the time.
Cheers,
Norm.
You are already using C++ -- every time you use Serial.print, or the Wire or EEPROM libraries etc.
It's not difficult, most of the time.
Cheers,
Norm.
Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Author of Arduino Software Internals
Author of Arduino Interrupts
No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QL Arduino
Hi Norm,
I have not read a C++ Book yet, so do not anything anout cout....
Coukd C68 be madd to have classes?
I have not read a C++ Book yet, so do not anything anout cout....
Coukd C68 be madd to have classes?
Regards,
Derek
Derek
Re: QL Arduino
No, it's not a C++ compiler. Even for QDOS-GCC, which ist closer to that, the effort for C++ support was seen as quite prohibitive.Derek_Stewart wrote:Coukd C68 be madd to have classes?