Hello,
normally, I´m not the type of guy who registers on a forum and instantly posts a question like this but I already wasted half a year and I´m really stuck with what I try to do.
Setup is like this:
Win7 machine connects to ArduinoMega board via usb/serial.
C# code running on win7 provides objects like pump, motor (PWM), linear actor, servos with predefined parameters (like speed, runtime, porttype) and also objects like sensors, buttons, switches.
I then run a parameterized thread start and call a method on the object that uses it´s properties as parameters.
(blink, fade, on, off, random, pulse, record input)
I made some changes to the firmata firmware on the arduino board and call it´s static arduino object (arduino.) on each thread.
The problem is, I want to run a predefined script of commands on the board when it´s offline (usb not connected) and that´s where the arduino becomes a pain.
Now, I´m asking myself if I could use Netduino and let the board handle the different methods for each port and just call those methods over serial connection from the win7 machine and otherwhise load a script to interpret commands and run it when it´s not connected via usb.
Calls from the win7 machine should look like
netduino.Ports.PWM[0].FadeUp(int speed, int resolution)
netduino.Ports.PWM[1].Blink(int blinkcount, int blinkpause, int blindurance);
So my questions are:
1) Is a netduino fast enough to run different programs on each pwm port smoothly (6 ports, update rate 200ms max) and still have some time left to read and set other ports over serial connection via the win7 machine or do some other stuff.
2) A netduino only provides 3.3V, so I suppose my 5V relais shields and the PWM shield I made, is useless if I port over to netduino (I read somewhere you can still use 5V shields from arduino??)
3) Is there an existing project like firmata, only for netduino so I can communicate between netduino and any c# program?
4) If a hardware interupt occurs, will it affect the threads, too or will there be another thread where the interupt method is called
5) Can I use a SD card to store some values so that when netduino looses power it can resume where it was?
Thank you for your time, I hope my english is ok
Greets, verschickter