I run a small group of teens who are excited at building things with the Arduino.
We have a weekly get-together and run a project on my desktop.
They want to take a READABLE copy of the code home with them (as seen on my screen and NOT with the color stripped out!) so that they can discuss, REFERENCE EASILY, and suggest what they could explore NEXT week at their get-together.
I'm trying to get them to put an Arduino onto their Christmas list!!!!!
Whether they do or not depends - to a fair degree - on their impressions of the User Interface; how they can show their (non-computer literate, generally) Parents what they can do and how EDUCATIONAL it will be!
I don't need smart-mouth replies that infer that I'm STUPID for not knowing how to do this EASILY!
(WHY doesn't the IDE work properly anyway? This has been going on for YEARS and nobody fixes it).
There's half-a-dozen youngsters here who are RAPIDLY getting turned off by the omission of such a BASIC functionality (what you see is what gets printed!)
Would someone, ANYONE(!), tell us how to easily get the printout to match the screen? Using simple, easy-to-follow instructions that a 12-year-old could use?
All rational, polite assistance will be gratefully received.
Smart-mouthed slap-downs will be filed in our collective bin.
AdonisTheFirst:
They want to take a READABLE copy of the code home with them (as seen on my screen and NOT with the color stripped out!) so that they can discuss, REFERENCE EASILY, and suggest what they could explore NEXT week at their get-together.
Two things spring to mind.
Although far from ideal, if the code is short a screen-capture image will retain all the colour. It will also have the IDE itself in the picture which may help with "selling" the product to parents.
I never use the Arduino IDE for editing my code I use an external editor (in my case Geany). It's colouring will not be identical to that of the IDE but when I print stuff from it all of the colour coding is retained.
...R
PS. If the kids have smartphones they could take a photo of your desktop screen.
AdonisTheFirst:
There's half-a-dozen youngsters here who are RAPIDLY getting turned off by the omission of such a BASIC functionality (what you see is what gets printed!)
I really have trouble believing the idea of printing something from a screen onto a piece of dead tree came from youngsters. It seems much more likely your bad attitude is what's turning them off.
Please understand that text color is not part of the source text, but is added by the IDE to the screen. Eventually the IDE menu functions for Copy for forum or as HTML can be used (CTRL...+C), provided that the editor or other programs understand such specially formatted text with CTRL+V.
You can download Visual studio for free and use the Arduino add in. I haven’t got on with VS as a programming tool, but you can cut and paste code into it and it prints nicely.
hammy:
You can download Visual studio for free and use the Arduino add in. I haven’t got on with VS as a programming tool, but you can cut and paste code into it and it prints nicely.
Many thanks Hammy.
I tried your suggestion and it works fine!
I'll run a few simple projects through the Visual Studio app., now that I have it - maybe it'll help avert other problems in future. Or having to brave the gauntlet of asking the mean-minded folks lurking here for help again.....
BTW, these kids are poor but keen to better themselves. You did a good thing for them.
Most of them don't have PC's (one has an old WindowsXP PC.....). Getting an Arduino for Christmas and plugging it into any PC they can get airtime on will be a big thing for them, so accept my thanks on their behalf.
AdonisTheFirst:
... Or having to brave the gauntlet of asking the mean-minded folks lurking here for help again.....
...
Hardly that. But this is not a children's forum. People here speak freely, and we get better help for that.
... Most of them don't have PC's (one has an old WindowsXP PC.....). Getting an Arduino for Christmas and plugging it into any PC they can get airtime on will be a big thing for them, so accept my thanks on their behalf.
You are using the online editor, right? I don't use it, but be aware that the printing, etc. function of the online editor will depend on the browser, and plugins used. It may not run correctly on very old hardware.
I have a Raspberry Pi 3+ for computer and HDMI TV for screen. The Pi kit cost $70 but I did have to add a $10 keyboard and $5 mouse. The ARM version of the IDE installed just fine.
Here's a couple of things to check out if you want to MAKE cheap Duinos:
It has very good software to ID and program AVR chips.
It covers the atmega328P and atmega1284P (w/16K RAM, 2 serial ports and 40 pins), but can extend to many other AVRs.
DIP form 328P's are getting closer to $2 each in small quantities every year. Last I got 1284P's they were $5.50 each.
Look up the MIT high-low tech article on attiny 45/85 chips for small projects, they run half as much.
Raspberry Pis are cool but I don't think they're the best solution for providing cheap computers to kids. You can find used computers with much better performance for less than a Pi will end up costing in the end after you add in all the necessary parts. With a bit of effort, you should even be able to divert perfectly good free computers from the landfill. I'm sure thousands are thrown away every day.
DIY Arduinos are not a way to save money. It's worth doing it for the sake of learning, or if you need custom hardware, but it's not the best beginner project for kids.
I have < $90 in this 3+. It's the mid-2018 version, 4 core 64-bit with > 1 GHz clock new. I could have gotten a used PC but I doubt that I'd get more for less.
$1.84 for a working Nano clone is pretty wild. I paid closer to $5 in 2014 and I do like the Nano.
IMO the learning to DIY is a big factor. Kids don't stay kids for long.
(WHY doesn't the IDE work properly anyway? This has been going on for YEARS and nobody fixes it).
Back to the original question, about printing. You'd think that given the basic ability to print (which the IDE has), AND the basic ability to export files. which is also there ("Copy as HTML"), that it would be pretty easy to somehow stitch those together and print highlighted text. But I looked into it a bit, and it seems to be a lot more complicated than I would expect - most OSes do not come with any sort of utility to "print HTML", other than a web browser - and of course the browser isn't set up to be a print utility used by other programs. Printing today is COMPLICATED, because rendering the same text on a printer is likely to be significantly different than rendering it for a screen. Give me back my upper-case line printers with standardized 132 column output and uppercase only (well, perhaps not - that wouldn't do what you want, either.)
Sigh.
You can find used computers with much better performance for less than a Pi will end up costing in the end after you add in all the necessary parts. With a bit of effort, you should even be able to divert perfectly good free computers from the landfill. I'm sure thousands are thrown away every day.
+1. Although there's a paradox, in that the people who can generally least afford a computer are the ones who need "newer" computers - I probably have a half-dozen desktops that I can still do things with, but I wouldn't wish on a beginner (WXP? Vista? Puppy Linux? Where's anyone going to learn to use those? And what good would it do them?) I've given away two laptops in the last year or so, but those were moderately usable (W8 or W10)
Refurbished "pretty good" systems can be had for less than $150 from reputable suppliers - less than it costs to upgrade an older system to a modern OS
I don't think that printing nowadays is more complicated than 25 years ago, on Win3.1.
For printing HTML a browser may be required to open the file then print it.
westfw:
Although there's a paradox, in that the people who can generally least afford a computer are the ones who need "newer" computers -
I think this is a much more important statement and the OP has shown that need.
Not all the world have the latest PC's and having a way to get the job done with the minimum is very important for a large part of the world.
Also, there are a lot of ways to write code, a simple text editor can work and the color of things is not important, just makes things easier.
to the OP : I have to say that I agree with the statement that your negativity will be off-putting to your students.
we all genuinely want to see people succeed.
also, I am not sure how a colored text page is going to convince a parent to buy a kid an Arduino. it is just beyond their awareness of what it means. maybe create a thing that they can take home and show something that the parent sees as useful.
Answer the parents question : what can it do for me ?
dave-in-nj:
to the OP : I have to say that I agree with the statement that your negativity will be off-putting to your students.
we all genuinely want to see people succeed.
I really do hope the students do not see the OPs opening post at all, its not a good example on how to approach a volunteer forum for advice ........
Hi,
If you download a notebook program called notebook++ and you copy and paste your code into it, when you set the programs language to C++ it automatically indents and shows code loops.
It produces a file in .txt so it can be read by any text program.
Hmm. The latest version of Processing seems to print colorized text...
(Sigh. The latest Processing includes its own html browser, for purposes of displaying documentation. So the relatively small change in the "print" code is dependent on already having a bunch of html-handling code elsewhere in the program. No easy patch there...)