Go Down

Topic: DuinOS: small and simple rtos (Read 53090 times) previous topic - next topic

juliandasilva

Ok, hacked again. Just yesterday we corrected it. Now, it's broken again. I think we will shut down the wiki. I really don't know what to do with spammers in an open source wiki site.
Sorry. Any ideas?

Julián

olddog

Can DuinOS be installed on Linux (Ubuntu)?


juliandasilva

We did not test it, but in theory it's platform-independent. It's already running on MacOS X and WinXP / Vista.

Regards,
Julián
http://robotgroup.com.ar

Mark G.

Julian,

Any ETA on the next update?  What did you decide to do regarding the next major rev?

FYI, I'm working on a project that has sockets via WiFi.  Once I get the hardware in place I'll test DuinOS out with it.

olddog

Hi Julian,  I am new to Arduino and DuinOS.  I just tried to verify the MOreComplexBlinking and got the error:


c:/downloads/programmingandsoftware/arduino/arduino-0018/arduino-0018/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr51/crtm1280.o:(.init9+0x0): undefined reference to `main'

Any hints as to what I have done wrong? I have a Mega board with 1280 chip. Thanks.  The blink sketch works ok.

olddog

Julian,

I installed Arduino + DuinOS on my Linux system & followed the same instructions.  The DuinOS example works fine now.  The Linux install was Arduino 0017, not 0018.  Perhaps that could be the difference.

juliandasilva

Thanks Olddog!

DuinOS is not running on the new 0018 due to the add of the Tone library (we think, but did not have much time for debugging). We were thinking in release the v0.2 and then came the 0018.

So we have two options: new version in about two-three weeks for the 0017, or new version later, but for the 0018 too.

Regards,
Julián

Mark G.

I vote for getting v.02 out ASAP.  That way we can start debugging it and hopefully get those fixes in the next rev that will support the new version of Arduino.

Robert S.

#128
Feb 10, 2010, 10:00 pm Last Edit: Feb 10, 2010, 10:00 pm by rsanders Reason: 1
I updated a fork of DuinOS v0.1 to run under Arduino 0018.  I've also changed it to piggyback on the same timer 0 overflow interrupt that the Arduino core already uses rather than using timer 1 for itself.  The 0018 Tone library seems to work fine with that change.

http://github.com/rsanders/DuinOS


No promises, but it works on my Macbook and Arduino Duemilanove.  I've also got a version running reasonably well on my Teensy++ 2.0.

-Robert


juliandasilva

Hi Robert, it seems great!

I just donwloaded it, but did not test it yet. The Tone issue was one of the main problems right now with the v0.1.  I have two questions:

1. Can we include your modifications in the future versions?
2. If answer 1 is yes, could you please tell us if you made extra modifications, so we can track all of them and run some tests?

Regards, and thanks!
Julián
http://robotgroup.com.ar

Robert S.

Of course, I'd be happy to share back.  I've just started working on this so I don't feel quite ready to submit my changes upstream without further polishing and documenting what changed.

BTW, I just remembered that the link I sent was to the main branch, but I fixed Tone / timer 1 on this branch:

 http://github.com/rsanders/duinos/tree/exp_timer0

So I need to finish and merge that back in.  I should be able to do that in the next few days.  The changes are and will remain freely available to anybody who wants them.

juliandasilva

¡Many thanks! I will wait for your definitive code, so I think we may integrate it soon!

olddog

Hi Julian,

I am having problems with the print and println statements with the Mega1280 board.  When I print either from within a taskloop or in a function called from loop, the board hangs.  I have tried delays, etc and made the change in main.cxx, but I only get the first line printed which is "Pump Pressure = 12.5".  As you can see from the commented code below, I have tried lots of variations without success.  Any ideas?

P.S. how is the update coming?

Cheers, Jim

#include <DuinOS.h>

 int readsToAverage = 4;
 int pumpPressPin = 0;
 int mainPumpPressure = 0;
 int sensorled = 13;
 int sensordata[8];
 float val;

taskLoop(misc)
{
 digitalWrite(sensorled,HIGH);
 delay(500);
 digitalWrite(sensorled,LOW);
 delay(500);
}

taskLoop(updpc)
{
/*  
  Serial.print("Pump Pressure = ");
  delay(100);
  val = readPumpPressure();
  Serial.println(val);
  delay(100);
  Serial.print(analogRead(0));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(1));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(2));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(3));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(4));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(5));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(6));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(7));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(8));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(9));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(10));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(11));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(12));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(13));
  delay(100);
  Serial.print(" ");
  delay(100);
  Serial.print(analogRead(14));
  delay(100);
  Serial.print(" ");
  delay(100);

  Serial.println(analogRead(15));

*/  
  delay(100);  
}

void setup()
{
  Serial.begin(9600);
  pinMode(sensorled,OUTPUT);
  createTaskLoop(misc,LOW_PRIORITY );
  createTaskLoop(updpc,NORMAL_PRIORITY );
}

void loop()
{
 //delay(10000);
 readsensors();
 delay(10000);
 //nextTask();
}
/* Function to read main pump pressure at the pump */
float readPumpPressure()
{
 int i;
 int tempval = 0;
 for ( i=0;i< readsToAverage;i++)
 {
   tempval = tempval + analogRead(pumpPressPin);
//    delay(100);
 }
 return tempval/float(tempval)  * 25.0 - 12.5 ;

}

void readsensors()
{
  Serial.print("Pump Pressure = ");
  delay(10);
  val = readPumpPressure();
  Serial.println(val);
//   delay(100);
  Serial.print(analogRead(0));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(1));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(2));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(3));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(4));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(5));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(6));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(7));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(8));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(9));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(10));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(11));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(12));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(13));
//   delay(100);
  Serial.print(" ");
//   delay(100);
  Serial.print(analogRead(14));
//   delay(100);
  Serial.print(" ");
//   delay(100);

  Serial.println(analogRead(15));

 
//   delay(100);

}

juliandasilva

Hi Jim, I have compiled and ran your code on a Seeeduino Mega, with the "Arduino Mega + Duinos" board selected, and I obtained the following results in the ID terminal:

Code: [Select]
Pump Pressure = 12.50
377 589 533 496 696 759 819 701 1 764 1 519 1 998 3 544
Pump Pressure = 12.50
360 606 572 494 652 760 863 721 1 552 0 118 2 964 3 514
Pump Pressure = 12.50
349 619 565 474 646 780 933 723 1 542 1023 501 1 902 1 684
Pump Pressure = 12.50
349 617 567 480 643 773 922 721 1 542 5 335 1 949 6 512


Which board and settings are you using?
Regards,
Julián

olddog

Hi Julian,

Thanks for the reply.  I am using an Arduino Mega clone also with Arduino Mega + Duinos board selected so we are using basically the same setup.  

I am running on Linux with version 0017. I didn't suspect the PC OS so I have not tried on a Windows machine.  Will do that today.

Sorry for the messy code I posted.  I was trying so many things it soon got out of hand.

Regards,

Jim

Go Up