Go Down

Topic: Does Arduino support both BASIC and C language (Read 4171 times) previous topic - next topic

Nick Gammon

Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

bibre

Quote

I heard of it, but I preferred TECO.  :-)


For the PDP-11 and ... Tape Editor and COrrector.

Must've been fun. Never had a chance to use it.   :)

I did write a PDP-8 simulator in Fortran for the UofM, Ann Arbor Dual IBM 360-67 (tightly coupled) MTS Terminal System at the time. And that ... was FUN!

Go blue!
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

AWOL

Quote
I did write a PDP-8 simulator i

But without the physicality of toggling-in your program, it just isn't the same experience.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

bibre

#18
Mar 09, 2012, 08:51 am Last Edit: Mar 09, 2012, 09:13 am by bibre Reason: 1
Quote

But without the physicality of toggling-in your program, it just isn't the same experience.


True, true, AWOL,   :)

But later on ... I also built an MITS Altair 8800 Kit; and there I got the physicality of toggling the switches for the booloader, in octal. Wow, what a great experience! To bad I sold my Altair to the M.I.T. (but this is the Monterrey Institute of Technology, now in their museum) just to get the money to buy an ISC's Intecolor 8001 and have a PC with colors. RED ALERT!, Star Trek, you know   8)

I guess, I chose poooooorly. Altair 8800 PC's are selling high on eBay. I wish I still had mine and still be able to toggle those switches and DEPOSIT  :(

Also sprach Zaratustra, Dave!
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

westfw

There were actually subtly different versions of TECO (from DEC) for PDP8 (12bits), PDP11 (16bits), and PDP10 (36bits.)
Then there was MIT TECO for the PDP10, which was substantially different.  That's what the first version of EMACS was written in...
I only actually used TECO on PDP10s.  Somewhere out on the net is a copy of the source code for TECO v124 (UTexas?), with a chunk of my email file where some of the source code should be (some sort of disk or backup error.  oops.)
I didn't love it enough to ever use the version that floating around for modern unix, though...

CrossRoads

How FORTRAN on punch cards? Had to do that for a freshman year college class.
Error messages back were even less useful than the IDE error messages!
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

retrolefty


How FORTRAN on punch cards? Had to do that for a freshman year college class.
Error messages back were even less useful than the IDE error messages!


I too took a night class at a local Jr. College in FORTRAN programming in the 70s. Typed source on a IBM 029 keypunch, wait in line to submit job to comppile and run on a IBM 1130, wait for job to be entered and return to find out results, usually didn't even compile because of some missing directive card or something. That was a painful class just because of the lack of a real-time inactive interface we now take for granted.  ;)

Nick Gammon

Very painful. You would wait a day for your batch of cards to be processed, and the printout returned. Then you get a simple compiler error. It might be a week before you even got a clean compile.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Graynomad

Quote
It might be a week before you even got a clean compile.

I have that problem now :(

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

bibre

Quote

I too took a night class at a local Jr. College in FORTRAN programming in the 70s. Typed source on a IBM 029 keypunch, wait in line to submit job to comppile and run on a IBM 1130, wait for job to be entered and return to find out results, usually didn't even compile because of some missing directive card or something. That was a painful class just because of the lack of a real-time inactive interface we now take for granted.


But then ... all of a sudden the 029 keypunches ran out of the ink ribbon. Sh...ucks, lets type more carefully and better start reading the punched holes  :smiley-yell:

Or worse you arrived to the room with the keypunches and all of the 029 were being used and there was just an abandoned 026 (no printing) with cobwebs free to use. Better to go away for a coffee or something and be back later or after midnight.   :smiley-sweat:

Fortunately for me, at the UofM there were also quite a few teletype terminals around campus which you could also use a run sessions interactively (well, sort of).

I'm talking 1969-71.   XD
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

jrmc114064

Sorry for interrupting the conversation, but relating back to the original topic, to learn C/C++ should you use a book that has the Arduino structure or use a Standard Programming language book?
Certified Beginner

Nick Gammon

I would find a C++ book whose style appeals to you. Or one of the many tutorial web sites. Some Arduino stuff is specific to the device, but you could say the same about anything (eg. 3D graphics). The basics are the same.

Just be warned that some C++ tutorials assume you have a keyboard and screen, and start you off with reading from the keyboard and displaying to the screen. However you can adapt those easily enough to use the Serial class to send to the serial monitor.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

CrossRoads

I don't know, I just jumped in, tried some of the tutorials, and had at it.
The Arduino structure is just C++ with libraries taking care of some things for you, like Reading the Serial port or writing to it,
and writing the I/O pins high & low.

All programs will follow this format:
Code: [Select]

// declare variables with initial values, or assign names to the pins to use.
// all use same format: variable_type (byte, int, etc.), variable_name, pin number or initial value:

byte onBoardLED = 13;  // the LED pin, turns on when high

byte incomingByte = 0;  // 8 bit variable

// set up stuff that will run once
void setup() {
 // set the pins as an input or output
 pinMode (onBoardLED, OUTPUT);
 // and give it an initial state
 digitalWrite (onBoardLED, LOW); // low is off
 // set up for serial comm's with the PC
 Serial.begin(9600); // using 9600 baud
} // end of setup

// now ready to do something over & over
void loop(){
 // see if a character came in from the Serial Monitor
 if (Serial.available() > 0){
   // yes , read it
   incomingByte = Serial.read();
   // and send it back to the monitor
   Serial.print (incomingByte);
   // turn on the LED while we're at it
   digitalWrite (onBoardLED, HIGH);
   // for some small time
   delay (10); // 10 milliseconds
   // and back off
   digitalWrite (onBoardLED, LOW);
 }  // done checking if a character came in
} // done with loop, go back to the top of loop

and use CTRL-T or Tools:Autoformat to make it nice & readable
Come up with a project, ask questions, read the Reference page.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Morris Dovey

@bibre - I tried Snobol but didn't like it much. It was, however, one of the languages that influenced my design of PL/C (written up in the March '84 edition of DDJ), which strongly resembled BNF with conditional output and symbol handling capabilities. My long-after impression is that Snobol lacked the flexibility I wanted/expected.
There's always a better way!

bibre

Quote

I don't know, I just jumped in, tried some of the tutorials, and had at it.


Same with me. I had written some very elementary programs in QuickC a long time ago, but I had forgotten most of the language. The Arduino Reference and Tutorials are excellent and helped me very much for a very quick start.
Billy     http://www.z-world.com/operations/gbremer/

When you've eliminated the impossible,
whatever remains, however improbable, must be

Go Up