Posts with «programming» label

Embedded programming gap

It seems that there is a shortage of programmers who can do embedded systems (which is what computer engineering is mostly about these days).

Critics lay much of the blame for the embedded programming gap at the doorstep of university computer science departments that have tended to migrate curricula toward trendy programming languages like Java at the expense of unglamorous tasks such as how to design and analyze algorithms and data structures.
Struggle continues to plug embedded programming gap | EE Times (by George Leopold)

I’m not so sure that Java is at fault here. It seems to me to be perfectly fine second programming language (after a simpler one like Python that does not require all data structures to be declared before any code is written).  The problem is more that the instruction focuses entirely on designing huge complex data structures and using large libraries of complex software components, rather than on fundamentals:

The problems start early in the curriculum. Too often an introductory Computer Science course will fall into one of two extremes: either focusing on the syntactic details of the programming language that is being used—“where the semicolons go”—or else treating programming as a matter of choosing components and plugging them into a GUI.

The basics—how to design and analyze algorithms and data structures—are covered summarily if at all. Software methodologies such as Object Orientation that are best approached in the context of the development life cycle for large applications, are introduced through trivial examples before their benefits can be appreciated: the proverbial cannon that is used to shoot a fly.

The education of embedded systems software engineers: failures and fixes | EE Times (by Robert Dewar)

I’m not so sure that I believe in Robert Dewar’s proposed solution, though, as he suggests having students do more high-level design (software architecture, rather than nuts-and-bolts programming), which is in direct opposition to his claim that students should be getting more training in low-level languages like C.

Robert Dewar also makes an argument for group work at the university level—something that is common in computer engineering programs, but apparently rare in computer science programs.  At UCSC, I know that all computer engineers, electrical engineers, and game design majors are expected to do group senior projects, and some of their other classes (such as mechatronics) are also group projects.

I think that the lack of group projects in many CS courses is not so much tied to Dewar’s idea “a perhaps regrettable staple of the educational process is the need to assess a student’s progress through a grade, and a team project makes this difficult” as it is to the problem of scale—a group project is only reasonable when the project is too big to be done more efficiently by a single person.  Creating and managing such big projects in lower-level classes would be a major undertaking, particularly in the short time frame of a quarter or semester, when a lot of things other than group dynamics need to be learned. Pasting a group structure onto tiny project would make things worse, not better, in terms of training students to be effective in groups (see Group work).

Some entrepreneurs have addressed the problem by starting up “initiatives like Barr’s week-long, hands-on Embedded Software Boot Camp.”  The idea is to take programmers who already have degrees and supposedly know C and train them specifically in the skills needed to do real-time programming. The cost is not small ($3000 for 4.5 days, if you register early).

Some computer scientists have been pointing out problems in the standard CS curriculum for a while:

I started saying this over a decade ago. I even did embedded stuff in my 3rd year data architecture course—my department was uninterested, and the students had a real hard time wrapping their heads around the thought that there are places where resources are limited.

The department fought me when I said that students needed to learn more than one language (Java). The department disagreed when I said that students should learn how to program for environments where bloated OO methods might not work (… But, the ARE no places where efficiency matters!!! It’s all about “Software Engineering”!).

The students had NO idea what it meant to program for a machine that had no disk, only memory.

Part of the reason CS departments are seen as being so out of touch is BECAUSE THEY ARE!!!

University should not be about job training, BUT it is also NOT about teaching only those things the faculty find interesting.

Struggle continues to plug embedded programming gap | The Becker Blog.

I know that there have been struggles between the computer science and computer engineering departments at UCSC about what programming language to teach first, with the computer scientists arguing for Java and the computer engineers arguing for C and assembly language.  Eventually they reached a compromise (which has been stable for about a decade), with the computer science students taught Java first and the computer engineering students taught C first, then both making transitions to the other language.

I think that both approaches work, but the strengths of the resulting programmers are somewhat different.  For device drivers and small embedded systems, I’d bet on the computer engineers, who have a better grasp of low-level details, interrupts, and hardware/software interactions.  For more complicated projects, I’d want one of the computer scientists doing the high-level programming, teamed with computer engineers to do the detail work.

I actually don’t like either C or Java as a first programming language.  I think that students would be better off starting with Scratch, which gets them quickly into multi-threaded code, real time operation, and race conditions, without burdening them with a lot of syntax.  Then they can switch to Python to learn about code syntax, types, and objects, without the burden (or support) of compile-time type checking.  After that they can switch to Java to learn about declaring all their data structures and having very rigid type rules (useful for bigger projects to make interfaces between different design groups more explicit).  In parallel with learning Python and Java, they should learn C and C++ in the context of the Arduino microprocessor (or similar small microprocessor) to control real-time physical systems.

The computer engineers could even skip Java, and learn their rigid type systems strictly in C++ (which they are more likely to use later), though Java is cleaner and makes the learning somewhat easier.

Computer scientists should not stop with this handful of languages, though, as they are essentially all Algol derivatives.  The CS students should also learn a couple of languages that come from different lineages (LISP or Haskell, for example).


Filed under: Uncategorized Tagged: Arduino, C++, computer science, education, higher education, Java, programming, Python, Scratch

Pebble ties itself up in Twine: sounds so rustic, couldn't be any less (video)

Take an e-ink smartwatch that's got plenty of willing customers, throw in a WiFi-connected sensor box and well, imagine the possibilities. The founders behind Pebble and Twine hope you are, because they have announced that the pair will be connectable through the latter's web-based interface. This means you'll be able to setup text notifications to your wrist when your laundry's done, when someone's at your door and plenty more mundane real-world tasks. A brief video explains how it should all go down, but try not to get too excited -- pre-orders are sadly sold out.

Continue reading Pebble ties itself up in Twine: sounds so rustic, couldn't be any less (video)

Pebble ties itself up in Twine: sounds so rustic, couldn't be any less (video) originally appeared on Engadget on Fri, 11 May 2012 16:41:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Help with Programming (arduino)

Hi LMR,

I've been working on my new robot, which has a lynxmotion A4WD1 base with an arduino as its microcontroller. I must confess that I am not the best programmer and I am still learning. I have found the follow code online and I was wondering if anyone could help me adjust it to be able to turn left and right. As of right now the program only tells the motors to go foward or reverse at full speed or half speed. The code:

 

 #include <SoftwareSerial.h>

read more

Let's Make Robots 11 May 22:39

Interfacing yor robot to your PC using Gobetwenio (can work with any MCU)

I am currently working on a project where I need to teach my robot to "see" using an ultrasound sensor. In particular it must find and collect drink cans on a playfield and return them to a specific location.

To make the programming easier I wanted to take the sensor output from the robot and display it on the computer as a chart. As I am a terrible programmer I did a quick google search and came up with Gobetwenio.

read more

Droplet and StackAR bring physical interface to virtual experiences, communicate through light (hands-on)

Light-based communication seems to wind throughout the MIT Media Lab -- it is a universal language, after all, since many devices output light, be it with a dedicated LED or a standard LCD, and have the capacity to view and interpret it. One such device, coined Droplet, essentially redirects light from one source to another, while also serving as a physical interface for tablet-based tasks. Rob Hemsley, a research assistant at the Media Lab, was on hand to demonstrate two of his projects. Droplet is a compact self-contained module with an integrated RGB LED, a photodiode and a CR1216 lithium coin battery -- which provides roughly one day of power in the gadget's current early prototype status. Today's demo used a computer-connected HDTV and a capacitive-touch-enabled tablet. Using the TV to pull up a custom Google Calendar module, Hemsley held the Droplet up to a defined area on the display, which then output a series of colors, transmitting data to the module. Then, that data was pushed to a tablet after placing the Droplet on the display, pulling up the same calendar appointment and providing a physical interface for adjusting the date and time, which is retained in the cloud and the module itself, which also outputs pulsing light as it counts down to the appointment time.

StackAR, the second project, functions in much the same way, but instead of outputting a countdown indicator, it displays schematics for a LilyPad Arduino when placed on the tablet, identifying connectors based on a pre-selected program. The capacitive display can recognize orientation, letting you drop the controller in any position throughout the surface, then outputting a map to match. Like the Droplet, StackAR can also recognize light input, even letting you program the Arduino directly from the tablet by outputting light, effectively simplifying the interface creation process even further. You can also add software control to the board, which will work in conjunction with the hardware, bringing universal control interfaces to the otherwise space-limited Arduino. Both projects appear to have incredible potential, but they're clearly not ready for production just yet. For now, you can get a better feel for Droplet and StackAR in our hands-on video just past the break.

Continue reading Droplet and StackAR bring physical interface to virtual experiences, communicate through light (hands-on)

Droplet and StackAR bring physical interface to virtual experiences, communicate through light (hands-on) originally appeared on Engadget on Tue, 24 Apr 2012 15:03:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Anyone here ever try a Netduino? (C#)

I am getting one dirt cheap (less than the price of a Arduino!) All I know so far is it has a ARM chip and you program it in C# (sharp).

Sounds interesting, and more than a bit scary (anyone know C# so I can get help when I need it?)

Let's Make Robots 22 Apr 17:16

Try ArduBlocks

Don't want to learn C (or for that reason the Arduino IDE)?

Could you make a small flowchart/block diagram of the program you want? Then (want) to change it into a running script?

ArduBlocks will do that for you! Translate your flowchart/block into a Arduino program and then show it in the Arduino IDE! Not only is this a great way to "model and test" it could also make a great way to learn to program scripts (then you know C!!!)

What type blocks does it have? Almost any you can imagine. Makes a robot control program fairly easy to write.

read more

Let's Make Robots 18 Apr 02:35
arduino  avr  bas  c  c++  programming  

mikroC vs BASCOM AVR

A few days ago I was going to try some programming in C using mikroC. So far I have been able to blink a LED...  mikroC is primarily designed to support the circuit boards MikroElectronica makes and does very little for the Arduino (and they plan on keeping it like that). It is still a great (but expensive!) C, just not one for the Arduino.

read more

Let's Make Robots 14 Apr 20:59
arduino  avr  basic  c  programming  

Need help with a steering algorithm...

 

This may be more of a general programming question than arduino specific; I guess the principles apply to all programming languages.

read more

Programming an Arduino in C.

I know my new robot runs (and runs nicely) on a ZBasic chp, but I will always have a great fondness for the Arduino, the first microcontroller board I ever used. (I used the PICAXE for a while too.)

Right now I have been programming a Arduino Uno with C. I really like the MikroC AVR C from Mikroelectronika. I am using the free version (limited to like 4k, decent space for C programs!). The full version is kind of pricey.

I then use AVRdude (love that name) to send the resulting hex file to the Arduino non-volitile memory. Works great!

read more

Let's Make Robots 12 Apr 17:00
arduino  avr  c  compiler  programming  uno  zbasic