a hobby class on microcontrollers

You know, for a second step, a two player pong game made with a couple grids of

8x8 leds (and keep the score in binary LEDs) wouldn't be much of a step beyond a blinking LED and it would be a seriously cool piece of eye candy for some person to say they created and understand it. I'm a hobbiest that occasionally makes odd crap, and even something like this--completely within my ability years ago, would make me pleased to have created it even if I did it today.

Moving the game paddle back and forth is virtually the same code as the Knight Rider LED light show that is often the second project an initiate into micrcontrollers does anyway as a challenge to the knowledge of what they learned.

Anything like switch debouncing could just be a stock schematic they assemble without understanding and/or a code routine they can call. They only have to know what the operating parameters are of any black box pieces, not the internals. Isn't that the hallmark of electronics design anyway?

-pete

Reply to
Peter Keller
Loading thread data ...

I _want_ ideas like this. I've done a LOT of work with 8x8 LED grids, already. So been there, done that, and can support a student well here. I'll add this to a list of ideas for students who seem like they might succeed well enough to give a shot at it.

I've been wrestling these things through my mind and I'm quite sure that most will not be ready, right away anyway, to deal with debouncing -- whether I/O pin-change interrupt based or timer polling based -- and any kind of state machine involved there. So yes, much needs to be kept 'under the hood' for a while. Yet they need to have the freedom to choose their own project, too.

I do hope that some will eventually want to know how these things may work, underneath. I will let their own interests and questions guide me; I will give them as much as they can handle AND NO MORE. The main thing here is that as soon as they seem to have had enough from me I shut up right away and stop. The key is to listen and take advantage of a momentary interest of theirs and drive through it with some information but only so long as I have their interest. I need to stop as soon as they feel at their own limits of processing and interest and not make it painful to them in any way. They open a door, I start walking through, and I stop just as suddenly when they let me know they are done. Then I do the same, the next time. And so on. They will be my guide as to what they can accept and absorb.

I will not ram anything down their unwilling throats. That is a guaranteed recipe for making people hate education and learning. And is the antithesis of what I'm about.

I'm not sure it's important to even answer that question right now. I'm mostly focused on people who have never done electronics or programming, either one, and who aren't even at all sure of their own desires or wants but who are willing to give it a random shot in the dark just to see if they want to do a little more sometime. It just won't 'click' for some and they won't come back for more. But even then, I want them to take home something that they will show others and have some positive things to say.

This is supposed to be fun and improvisational.

And if someone decides they'd like to push a little more or reach for something just a little harder, I'd like to find a way to accommodate that, too. And be there to help make it a mix of fun and learning with a successful end-point of some kind they can take back with them.

Jon

Reply to
Jon Kirwan

I'm by no means an instructor of any kind, but I would choose to just explain scary looking black boxes away like "the motors inside of vacuum cleaners need quite a lot of physics to describe and understand how they work, however, you don't need to know that! You only need to know the interface to the vacuum cleaner: the plug which goes into the wall, the switch which turns it on, the bag which you have to check to see if it is full and replace, and the moving brush into which fingers are not to be put!"

Gaining a method to systematically discover and learn the interface to something, be it a PIC, a word processor, a vacuum cleaner, or an escalator, is arguably more important that understanding how it works. As long as the various pieces have identifyable "slots and tabs" that fit together reasonably well, who cares what the pieces do on the inside.

I'll completely defer to your expertise in teaching a crowd like this. I have no understanding of how to do that.

The thing which ultimately drew me as a hobbiest to electronics and digital design, was the fact I could make something which existed in and manipulated the real world. I discovered this was MUCH more viscerally satisfying than carefully altering the orientations of magnetic fields on hard drive platters in unknown locations, which is what I do for a day job--I'm a hacker. :)

Good luck with your project!

-pete

Reply to
Peter Keller

that is the crux of the problem, when I learned about micros in the

70's, blinking a light in a sequence was impressive, so it was fun to show off stuff like that, to blink an LED with a micro requires a lot of things to work (code, complier, linker,downloader,cables, compatible pc, power supply, etc) but the results today are unimpressively crude

maybe nowadays the equivalent is gene splicing, you know make a grasshopper with 3 legs in your basement

hey what you doing is great... good luck!

Reply to
steve

It does not need to be super-exact on hardware, just Boolean Watch at the simplest. The main point here, was to steer the language choice, so it does NOT exclude running code on a PC-IDE, and to allow a PC environment, to learn the simplest things like Looping.

I did watch the TI demo, and they have a simple Source-code-Avail Live PC Screen pathway, which looks very nice.- just running a Temperature readout, in a largish font, but clearly very easy to expand. - all the pathway stuff is there and working.

Being able to customize that PC end should appeal to many. I'll dig some more.

Here, it really means BASIC needs to generate Debug object files, which is why I flipped my choice to the BCX, as it leverages all the tested Debug, with (hopefully) little effort.

I was meaning able to install everything onto a Flashdrive and run from the flash drive. Easy to take it home then :)

-jg

Reply to
-jg

rids of

beyond

ome

onally

ty

ay.

I've downloaded the MSP430 Temperature GUI demo

formatting link

It's coded in Java+DLL, uses a Serial emulation path (2400bd?), the 'engine room' is pasted below.

So, you could easily expand that to allow 8x8 LED emulation, on the PC for class-viewable demos, and allow testing without needing the LEDs

- but they will need Java installed..

-jg

*paste TI java snippet* public void draw() { if(portChosen =3D=3D true){ dataRead=3D myPort.read(); if(dataRead !=3D -1){ //clear previous temperature reading from screen background(backColor); stroke(255);

//Update console print("Temp: "); print(dataRead); println("\u00b0");

//Update on screen GUI text("Current Temperature: ", 420, 60); text(dataRead, 835, 60); text("\u00b0", 900, 60); } } }

Reply to
-jg

I updated some info on

formatting link

and have it on ebay:

formatting link

Reply to
linnix

Hmm. $3 shipping. For two-off, I am not going to quibble at all. But any chance of combining later on? Or is the $3 shipping contributing profit-wise in a necessary way on your end?

Thanks, Jon

Reply to
Jon Kirwan

ork

Yes, I can combine shippings. I was trying to set up Dutch action for

5 items, but can't figure out how to do it. I haven't done ebay for some time. $3 should be able to ship 5 of them.
Reply to
linnix

Thanks. I was mostly asking because I've been told that mail order camera companies, those selling at very competitive prices, make more profit from the shipping department profit center than they do on the camera's margin itself. I just needed to know if the $3 was a necessary part of my own computations later on.

Thanks, again! Jon

Reply to
Jon Kirwan

I have only been half following this thread and my first question is what exact age range are you talking about?

Other half teaches basics of control, looping and animation to

13-16 year olds, using Scratch (scratch.mit.edu) quite effectively. Even done some burglar alarm control simulations.

She can give them tasks and they can mainly quickly do it, some go further. Some have even created little games on their own.

There is some external hardware that can be either purchased or made.

...

With Scratch they can do their own on screen animations, and as it is free they can install it at home as well.

Get them to do the basics of a game in Scratch first then see if they think they can do a DS game.

The 17-18 year olds at the other half's school in computing course have to do a project that involves computational tasks often as a web front end to PHP/MySQL, some of the children have to be told that a project like Project Management scheduling or online booking systems requiring multi-user logins and calendering are too complicated for one person in the time. Very few across the country (UK) even attempt the phone app or game app for the actual device. Also they could be doing upto three other subjects with projects.

Bearing in mind they are doing this in the second year, by

Summer break find a project, which involves finding a 'customer', documenting an interview and coming up with documented interview and requirements spec

Autumn term is documenting design spec, system analysis and starting and database or similar data descriptions

Spring term - doing design, testing, documenting testing and design.

Start of Summer term (end of year) finalising project testing and documents, doing interview with 'customer' for feedback and adding next stages plan to project.

All the time they are still doing the course and learning some of the stuff they need to do. Many projects are 'completed' and handed in 'on the wire'.

Teenagers especially think they are indestructible and can do ANYTHING without training, they always have and always will.

If they have not seen any programming before I strongly recommend Scratch as an introduction, if nothing else to find out their abilities.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Timing Diagram Font
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
 For those web sites you hate
Reply to
Paul Carpenter

High expectations are always a problem in introductory programming courses. For short courses functional languages like LEGO work quite well. The primary reason is the language core has a very simple metaphor but you can use it to teach most programming concepts without overwhelming detail.

The nice thing about functional languages is for a reasonably simple implementation the core interpreter is very short maybe 300 lines.

Regards

-- Walter Banks Byte Craft Limited

formatting link

--- news://freenews.netfront.net/ - complaints: snipped-for-privacy@netfront.net ---

Reply to
Walter Banks

that is because ebay eliminated Dutch auctions a short while ago...

Reply to
steve

I think I broadly agree with this and I need to give this some more thought and actual testing effort to verify.

Hmm. Any particular pointers here that I may examine to elaborate the details here? (In no way am I disputing your point, it's just that I'm lazy enough to want any help I can get.)

Thanks, Jon

Reply to
Jon Kirwan

I believe the first post (and perhaps a few others) mentioned ages. It may be held at high school as an after-school hour long session once a week. Those folks might be as young as

15 or so. It may also at other times be held at a senior residence center and those folks might be as old as 75 or so. And I may also hold them as community education classes via a local community college (not for credit, as that adds too much cost, since colleges are in the business of selling credit hours and aren't likely to cave in there.) Those folks may be in between the other two ages.

Which pretty much means anyone, at all, except fetuses and kids too young to walk, yet.

I just went to the web page. I have spent exactly 60 seconds looking and stopped. I wasn't able, in that time, to find programming source code examples and/or to see how this might operate on a tiny embedded micro to control a small movable toy without a PC present. If you have some good pointers to look at there, or some thoughts about it, I'd enjoy that.

Cheaply?

Just as in a beginning class on pottery, there is very little time available to explore capabilities by teaching something _else_, first. I will have very little time, in some cases. In a summer class done as a community education extension at a community college I may have 4 weeks and probably no more than 2 hours per week. As in pottery, the idea is to provide a variety of easy to apply tools and get them to start playing right away. I want them to actually complete something before the end that is fun and worth taking home. If I tried to get them through doing a Scratch project (I'm guessing here, of course), the class might be over before they ever begin.

I think I need to focus directly and squarely on the primary goal. I want to reach folks who may never do much more, but wouldn't mind taking a crack at it and maybe taking a project or two home with them and ... never again come back.

If I were trying to find out their programming abilities, for example, I might start them out with this:

formatting link

But most folks would run from that, screaming insanely all the way home. And I want to reach people, not send them away to come back with pitch forks to drive me out of town!

Jon

Reply to
Jon Kirwan

.....

Scratch is good at getting quickly people used to looking at concepts and seeing results. Too often I have seen people try to programme something without understanding concepts of a simple loop or variables. Which you will need even in a functional language, except Turtle.

This is generally easier than boring paper exercises. In minutes they can start getting simple things as constructs fairly language neutral with results they can see.

Very few people between 15 and 75 have seen or even remember simple programming constructs and then flounderwhen doing more things.

If nothing else those interested in video games can see waht is involved.

When I last looked yes.

See

formatting link

In particular

formatting link

A USB sensor board with sound and light sensors, slider input aligator clips for meauring resitance, and USB driven.

Then of course it can interface to the Lego WeDO

formatting link

Which includes

Motor Distance sensor tilt sensor.

Then possibly transfer totally to Lego Wedo build a motorised unit.

Then again your own motorised unit.

It gives them the ability to grasp basic programming concepts QUICKLY without linkers, debuggers, programmers, knowing language A over B or C or D. They can play with it at home for free.

By adding sensors/motors get to start doing simple things, that build up.

Considering the other half gets 13-14 year olds in 40 minute lessons going from nothing to some simple animation/game/programming construct going that gets their attention as it plays sounds and moves graphics. That sort of thing especially for the younger ones grabs their attention.

They graphically build loops and conditionals, which say things like 'while' drop in the condition and event or variable or constant. If statements and others similarly.

It is Java code so easy to run on almost anything. The project can then sit on a web page and be run from a browser!

There are loads of resources for taking it further at home. even if they don't come back

That could the first 30-60 minutes then take an example you have into a micro for a toy, even if it is a simple line follower or not hitting walls 'bot', then take it further whilst using the concept and demonstration you started with.

You could use a USB sensor board to drive the graphic on YOUR system to demonstrate, (that keeps the gamers interested), this you can then use as the basis of how you then do your embedded micro.

Use it to drive motors and read sensors.

Even if that is your demonstrator, then show them the toy or whatever is to be controlled by the embedded micro.

There are loads of resources for taking further at home. even if they don't come back

That is awful

Drop me a line and see some simple ones that have been made from a URL I cannot give out here for various reasons.

I should be able to get from other half her step by step movies on how to do these things in Scratch.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Timing Diagram Font
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
 For those web sites you hate
Reply to
Paul Carpenter

Scratch mentioned some slave IO choices, but nothing standalone, and IO does not seem to be their 'focus'.

Looks similar to Lego, without the expensive HW lock-in.

Could have a place for early lessons on conditional decisions, and timing ?

But I think it's hard to go past the TI system, and some dual-language handling (as in Basic to C to allow apparent Source-Step- Debug)

example: with some minor preprocessor legwork, this compiles in a C compiler, and illustrates what can be done to lower 'culture shock' in a dual language debug pathway.

char nibble(void) Begin if (( ch=3Dgetchar() )>'9') Then return ch-55; Else return ch-48; End_If End_Function

-jg

Reply to
-jg

Bloody nonsense. RPN is more natural than formula's. This is how I started addition in first grade:

5 6

-- +

11

Then in grade 3 or so the children have to learn complicated rules like "meneer van dalen wacht op antwoord" to understand how

5+6*3 is calculated.

-----------

It is very natural to do

5 \ the computer has remembered a number for you 6 \ the computer has remembered another number for you .S [ 6 5 ] OK \ See?
  • \ The computer has added the last two numbers it remembered . 11 OK \

This is in view of the foregoing arguably false. This is a totally unfounded claim and I dare you to back that up with some data.

It only reflects your inability to cope with RPN after years of seeing formula's like (a+b*c). You can't invert the argument and claim that children who retain their ability to understand RPN would have problems.

Look at recipes.

"Mix the eggs and the butter." is for the more advanced.

Break three eggs in a bowl. Add 3 spoons of butter. Mix until it is homogeneous.

Forth is tried and proven effective in robot projects, e.g. Lego Mindstorm.

Groetjes Albert

--

--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst
Reply to
Albert van der Horst

The 300 line comment comes from personal experience implementing a parallel functional language that Byte Craft uses to control the processor simulators we use for compiler development. The syntax we use is similar to lisp

(name arg list)

There are about a dozen core primitives. Functions and primitives use the same syntax. The interpreter is a simple recursive character string consumer evaluating innermost brackets first. Execution is surprisingly quick. We still use it.

There are several logo's written in java script including the following link

formatting link

To use your pottery example. Everyone who goes to a pottery workshop has some idea what is involved in making a bowl. My point is for teaching a computer course the only thing most new students know is the relationship between user interface and behavior. Build on that reference with a simple metaphor.

Regards

-- Walter Banks Byte Craft Limited

formatting link

--- news://freenews.netfront.net/ - complaints: snipped-for-privacy@netfront.net ---

Reply to
Walter Banks

Okay.

Reuse is good.

The following addition isn't meant to be a dispute. More to help provide some boundaries that come to mind when reading what you just wrote here.

I had no idea about "throwing" (or even so much as the word, itself, either.) I had started the class with a plastic baggy of odd tools I'd been ordered to buy when I entered the classroom and I probably only recognized the "sponge" in there, and even then I had no idea what I would soon learn as its purpose. Had I tried to guess beforehand, I would have been almost entirely wrong.

Of course I now have a more refined understanding and a better sense of my own lacks and skills.

So I suppose it depends on what you mean by "some." I would probably say I had a vanishingly small but not quite absolute zero value. It still amounted to zero, for all practical purposes.

You might quibble here. But my point is that I'd like to create something that assumes about the same level from any one placing themselves in my hands as the pottery class teacher expected from me. No ability to even _recognize_ the tools, let alone know how they are properly applied.

Sincere thanks for your thoughts.

Jon

Reply to
Jon Kirwan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.