I'm not a troll but....

perkunas:
"The netduino's i/o is weaker though, which is one reason people stick with Arduinos."
How so, the pin layout is the same, are you saying the arduino is faster, maybe idk but a nanosecond here there shouldn't mater on most projects.

I think he means "weaker" as in less power. Arduino pins can drive up to 20 MA at 5V; the Netduino's pins are 3.3V and some of the analog pins can only do 2mA.

magagna:

perkunas:
"The netduino's i/o is weaker though, which is one reason people stick with Arduinos."
How so, the pin layout is the same, are you saying the arduino is faster, maybe idk but a nanosecond here there shouldn't mater on most projects.

I think he means "weaker" as in less power. Arduino pins can drive up to 20 MA at 5V; the Netduino's pins are 3.3V and some of the analog pins can only do 2mA.

That's exactly what I meant.

Also if your only concern is i/o then you have the wrong product, you should be using a phidget and not a microcontroller.

Nonsense. If I want something permanently stuck to a PC, then a dumb device might be appropriate, but an Arduino can run standalone, and can better interface with other devices than the netduino.

I'm beginning to think your thread title might not be entirely true.

"I think he means "weaker" as in less power. Arduino pins can drive up to 20 MA at 5V; the Netduino's pins are 3.3V and some of the analog pins can only do 2mA"

That's only some what true, my pins run at 5v
(they are 5 volt compliant, but normally work at 3.3vdc)
I'm not sure, but I don't think you can do that with a analog pins.

"What was your project anyway"
It was a Hydroponic controller it had to control water, temp, PH, nutrients, Lights ect.
All at the same time ie. multitask (something arduino cant do)
"You may be a c sharp wiz but everyone else is not."
C# wizard, no hardly, but most programers use and like C#, so its easy to get the help you need,
and believe me I needed lots of it. Actually I like visual basic, its what most of us stared with as kids.
That's going to be fun to play with.

All at the same time ie. multitask (something arduino cant do)

You mean "something I wasn't able to make the Arduino do".

Try looking at what others are doing with Arduinos.

This aquarium controller is doing just as much as your project - Arduino Powered Aquarium Controller Project | Marine Aquariums South Africa

GardenBot is an excellent modular system - GardenBot - open source garden automation project

HydroBot does all yours does, and serves a pretty smart looking web interface to monitor and control it - http://www.cs.helsinki.fi/u/ljlukkar/hydrobot/

It was a Hydroponic controller it had to control water, temp, PH, nutrients, Lights ect.
All at the same time ie. multitask (something arduino cant do)

This all sounds rather slower than reflexes required for landing a Mars probe :slight_smile:

Surely the plants can wait a couple of loops through the program to get their water or nutrients ?

retrolefty:
(...) One always needs to select the proper tools for the job. So grow up with the attitude thingee, if you selected the wrong tool for your projects then that was your error, not the fault of the Arduino.

Touché!

Well said, mate, and that is exactly the first thing that came to my mind when I read the OP.

but that's not true multitasking,

No you only get true multitasking with multiple cores which you don't have on a netduino.

some of the analog pins can only do 2mA"

That's only some what true, my pins run at 5v
(they are 5 volt compliant, but normally work at 3.3vdc)

You mean 5 volt tolerant not complaint, that only applies to when the pins are in input mode not output mode.

perkunas:
"What was your project anyway"
It was a Hydroponic controller it had to control water, temp, PH, nutrients, Lights ect.
All at the same time ie. multitask (something arduino cant do)
"You may be a c sharp wiz but everyone else is not."
C# wizard, no hardly, but most programers use and like C#, so its easy to get the help you need,
and believe me I needed lots of it. Actually I like visual basic, its what most of us stared with as kids.
That's going to be fun to play with.

You can certainly do this project with arduino but it's more of a personal preference to use or not to use multitasking libraries (I don't know if multitasking is supported by netduino hardware, such as task save-and-switch, privileges, memory protection etc.). You can easily use arduino to monitor all sensors and control all pumps if you want but you prefer the conceptual simplicity of multitasking. Fair enough.

Just a side comments of programmers being able to help, last time I helped my programmer friend fix his meat slicer, all the problem was that its fuse box was cheap and the cap fell out of the socket with the fuse and he didn't know or mentioned those were important parts of the machine. We opened the thing and tested every part and I traced the wire to a box and said, "Was there anything you didn't show me?" He then produced a couple of loose parts, being the cap and the fuse. Software and hardware people have been trained very differently. Despite that, I see good mix of both sides with arduino. You may be capable man/woman with hardware but you should hope your software people are too. Not long from now you will demand even more memory and faster processor speed since you do multitasking and visual basic, exactly what microsoft has been demanding.

I'm wondering how the Netduino "even cost less" than an Arduino. I have never see this. It's $35 at both Amazon and Sparkfun. Arduino R2 is still $22 at Amazon.

My day job is writing .NET code. IMHO, one of the best things about the Arduino is that it doesn't run .NET. I don't need that sort of heavyweight wrapper on this sort of device.

agreed, .NET is nice on complex problems, it kicks you in the crotch and steals you wallet when you just want it to go from A to B doing something simple, like controlling a plant system.

I have to say, I dont get the problem here, theres no multitasking, your just writing more convoluted code thats going to be executed in order at the end of the day, just like a loop. Its nothing more than timesharing between program items.

if you like the netthingie great, but there is more than one tool in the shed, and they all have their benefits. I personally have an arsenal of controllers, and I am not going to use my 800Mhz Vortex86 to blink a LED, nor am I going to use my arduino as a image processor.

Grumpy_Mike:
No you only get true multitasking with multiple cores

No, that's "multiprocessing". This Wikipedia article gives a good explanation of the differences among the various "multi-"s.

You might say that multitasking is "virtual multiprocessing": like "virtual memory" or "virtual machines", it provides the illusion of having more physical resources.

@perkunas

a couple of comments.

  1. the linux IDE surely could use some love but it's also a nightmare to get it to work with all these different permutations of distributions and packages etc
  2. It really depends on what is your style of programming. If you've learned on a modern computer and are used to multithreading, multitasking and all of that, clearly Arduino seems very limited but if you apply different coding patterns you can get a LOT of mileage out of it. I teach my students about state machines all the time, I just don't tell them they are called like that and they can implement them very easily.

PS: I learned on a ZX81 which had 1kb of ram and Arduino is like a Ferrari compared to that :slight_smile:

m

perkunas:
2)Halfway through the program I found it impossible to multithread and multitask, something you want to do after your 1st blinky.
Oh sure you can write a state machine, or some other trick but that's not true multitasking, confusing totally impractical.

Yet another modern PC programmer who does not understand state machines. No surprise there.

What Mike said, you need multiple cores to do "true multitasking". Which is possible with Arduino when you add MCU's... I'd go for SPI or I2C bus and some extra 1-wire bus comms as needed but the real question is why for a task like yours? Organized and written properly it should be well within the capabilities of an Arduino.

the arducopter/ardupilot code should provide a good example of how far you can stretch the hardware of an Arduino :slight_smile:

m

GoForSmoke:

perkunas:
2)Halfway through the program I found it impossible to multithread and multitask, something you want to do after your 1st blinky.
Oh sure you can write a state machine, or some other trick but that's not true multitasking, confusing totally impractical.

Yet another modern PC programmer who does not understand state machines. No surprise there.

What Mike said, you need multiple cores to do "true multitasking". Which is possible with Arduino when you add MCU's... I'd go for SPI or I2C bus and some extra 1-wire bus comms as needed but the real question is why for a task like yours? Organized and written properly it should be well within the capabilities of an Arduino.

No, you don't need multiple cores to do "true multitasking". You just need enough memory to allow each thread to run in its own stack frame, and something to do the switching. There are various thread models that use cooperative threads.

That assumes you are in control of all of the software, and don't use pre-written libraries that use delays. For example as say the Morse code library and the IR library both do, and which I want to marry together (I have a camera shutter release, that wants to fire off a message in Morse code, but I want to be able to stop the beeping if I get a button press, either a direct button or a button with an IR transmitter). Yes, I eventually will take the source to both, and rewrite them to use state machines, but it would have been a lot simpler if I didn't have to write everything from scratch, and I can just use the libraries as is. Both state machines and threads are tools in the toolbox. Sometimes one is better than the other.

As far as I know about multitasking, not all threads have to be running simultaneously. Think about time-share property (or time-division multiplexing for cell phone people) as a parallel to multitasking on a single processor. IIRC, Intel's first true multitasking processor was the 80386, with hardware dedicated to multitasking, privileges, and virtual memory management, all of which are necessary to make an effective multitasking operating system. I don't know what MCU has that capability nowadays but multitasking is not just hardware but also sophisticated software that organizes tasks and relies on hardware to make each task feel like it is the only task running (virtual memory management for chaining up fragmented memory, memory/hard drive swap, and machine state save and recall etc.) and prevent unauthorized access to memory and other resources by tasks that don't have the privileges. Trying to do simple things all at the same time with multitasking is trying to kill mosquitoes with a canon. The OP may have programmed a general purpose computer for too long and he overlooked the fact that modern computers started not much more capable than arduino (8-bit, little memory) decades ago and back then people controlled multiple things just fine without multitasking software or hardware.

FYI, 80386 had a maximal memory of 4GB and virtual memory space of 64TB. I wonder if any lucky 386 has ever got close to that amount of memory.

No, you don't need multiple cores to do "true multitasking". You just need enough memory to allow each thread to run in its own stack frame, and something to do the switching.

I disagree. By "true multitasking" people mean threads are really running in parallel - or at least that is what I mean :slight_smile:

If you have a single core switching between threads then the illusion is given that things are happening in parallel but the reality is that threads are being processed sequentially even if you are allocating a higher priority and more processor time to some threads. The Arduino can multitask (in what I think is the normal sense of the word) , but it is not "true multitasking".

True multi-tasking is 1 processor running various tasks in their own time slot. We have gotten used to Multi-processing with cheaper and cheaper silicon and the resulting ability to pack more in less space. But much of it still boils down to one processor doing several things in sequence, and doing it so fast that it looks like many things are happening in real time.

This has been going on for many years. My first multitaking system was an Allen-Bradley PLC (programmable logic controller) which was able to control various parts of a machine, asynchronously. It ran a tight control loop that executed 535 time a second. Close enough to be called real time. Read an encoder through 12 digital inputs, Had about 48 switch inputs for the various parts of the machine, approx 24 outputs for various motors and solenoids. Had 4 separate subsystems all running their own control sequence at the same time.

It is interesting that with Arduino and such we are just going back to the early days of industrial PLC control. 1 processor managing some I/O and making things do their stuff based on some logic and some inputs.

kf2qd:
It is interesting that with Arduino and such we are just going back to the early days of industrial PLC control. 1 processor managing some I/O and making things do their stuff based on some logic and some inputs.

True until you look at who were using PLCs and who are using arduinos and the level of difficulty using PLC vs. arduino :stuck_out_tongue:

I thought multitasking was a fancy word for time-division multiplexing with programs. It's always about one unit trying to serve the needs of many. Some people may have confused multitasking with parallel computing, where multiple tasks could be carried out by multiple units at the same time.

Gentlemen, gentlemen. If concurrency without interrupts or convoluted schedulers is desired, humbly suggest you look at the Propeller chip/boards (at parallax.com). It's 32 bit with 8 cores that run truly in parallel at 80 Mhz. You no longer have to program it in SPIN or assembly, as there's a new Win/Mac/linux C/C++ IDE (coded in C w/ Qt not slow Java). Break up problems into parallel tasks between the 8 cores. All Prop pins are general purpose. On a Prop if you need a UART, you load up UART code into a core, let 'er rip, read and write data via shared memeory. Need VGA out? Dedicate a core, add a few resistors. The chip is $7. There are also Arduino shield compatible Boards, like the ASC+ (with a lot of goodies) at $49. Nice.