Show Posts
Pages: [1]
1  Development / Other Software Development / Céu in a Box (high-level programming for Arduino) on: July 09, 2012, 06:59:17 am
"Céu in a Box" is a distribution of Xubuntu that comes pre-installed with Céu:

http://www.ceu-lang.org/wiki/index.php?title=C%C3%A9u_in_a_Box

Céu is a high-level and safe programming language that targets Arduino and
which I announced on this list a couple of months ago:

http://arduino.cc/forum/index.php/topic,90129.0.html

For some examples of applications, see the the following link:

http://www.ceu-lang.org/wiki/index.php?title=Arduino

For an Arduino-based game written with Céu, see the following link:

http://thesynchronousblog.wordpress.com/2012/07/08/ceu-arduino/

The runtime footprint of Céu is around 2-Kbytes/ROM and 50-bytes/SRAM.

http://www.ceu-lang.org/

Any feedback is welcome!

Thanks,
Francisco
2  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: March 26, 2012, 10:21:27 am
The link you provided gives a very similar example to mine and "assumes the do_something() execution time is well below the system tick period and that my_thread() is not preempted":

Quote
An obvious solution is to write something like this:

Code:
msg_t my_thread(void *param) {
  while (TRUE) {
    do_something();
    chThdSleepMilliseconds(1000); /* Fixed interval.*/
  }
}

This example works well assuming that the do_something() execution time is well below the system tick period and that my_thread() is not preempted by other threads that could insert long intervals.
If the above conditions are not satisfied you may have do_something() executed at irregular intervals, for example:

T0…T0+1000…T0+2002…T0+3002…T0+4005…

Also note that the error increases over time and this kind of behavior can lead to anomalies really hard to debug.

The tick preemption time is an implementation detail and your program should not depend on it to behave correctly.
He even suggests reliable alternatives to the code above.

In my post I didn't say that you cannot implement that program correctly with an RTOS.
My point is that it is not as easy as the manuals usually state (e.g., "Look how easy is to have two blinking leds.").

I corrected the ChibiOS implementation to sleep 10000ms in the main thread (avoiding the overflow) and changed the blinking threads to HIGHPRIO.
The behavior is exactly the same (at least visually).
In the DuinOS implementation I changed their priorities and the behavior is similar (still not synchronized).

That said, I also cannot agree that blinking leds should run with the highest priority in an application.

I wonder if someone can reproduce these tests.
3  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: March 25, 2012, 09:58:32 pm
Thanks!
I included a link to the complete source files.
4  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: March 25, 2012, 12:47:10 pm
Hello,

I wrote a simple comparison of Céu with two multithreading libraries for Arduino:

http://thesynchronousblog.wordpress.com/2012/03/23/the-case-for-synchronous-concurrency/

Céu for Arduino: http://www.ceu-lang.org/wiki/index.php?title=Arduino

--
Francisco
5  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: February 07, 2012, 07:17:53 pm
Very interesting language. Thanks for developing it!  I am working on ArduBlock and I am going to take a look at this to see if we can use it as the backend language. I like the parallel construct which is something I have been thinking about doing with the ArduBlock block language.

Hello David,

I am aware of ArduBlock, it is a great software, and a parallel "control block" would be handy.

I would love to help you integrating Céu as your backend!

Feel free to inquire me about Céu.

--
francisco


6  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: February 07, 2012, 07:05:06 pm
This looks very interesting.  Noob question though: when you use Céu can you use the regular C alongside it?  Or is it one or the other but not both?

Yes, it is very easy to use C from within Céu, just prefix the symbol with an underscore:

Code:
_digitalWrite(13, _abs(v));

You can also define C functions inside C blocks:

Code:
C do
    int my_abs (int v) {
        if (v >= 0)
            return v;
        else
            return -v;
    }
end

_digitalWrite(13, _my_abs(10));

--
francisco
7  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: February 04, 2012, 06:55:21 pm
Looks interesting, vaguely occam-like.

Yes, on the one hand both have this idea of parallelism and communication among processes (trails in Céu).
On the other hand, being derived from CSP, occam's processes execute very differently from Céu's trails.
I believe the synchronous semantics of Céu (a la Esterel) is more appropriate for Arduino applications.

--
Francisco
8  Development / Other Software Development / Re: Céu: a high-level programming language that runs on Arduino on: February 04, 2012, 06:37:33 am
Thanks for the feedback!

Some more info about Céu:

* Open source (MIT license)

* The compiler translates to C.
   It also requires a binding file (e.g. for Arduino) included in the distribution.
   This gives Céu a good portability.
   Also, it is possible to understand the generated code (but not easily), and even hack it.

* The footprint is around 2Kb-4Kb of ROM and 100b or SRAM, depending on the language features in use.
   (for each application, the compiler uses #ifdefs)

--
Francisco
9  Development / Other Software Development / Céu: a high-level programming language that runs on Arduino on: February 03, 2012, 07:05:03 am
Hello List!

This is my first message here.

Céu is a reactive language targeted at embedded systems.
It aims to offer a higher-level and safer alternative to C.

With Céu, you can write multiple loops in parallel that can wait for an arbitrary number of events and/or time.

The following example blinks 3 leds forever, each with a different frequency:

Code:
   pinMode(11, OUTPUT);
   pinMode(12, OUTPUT);
   pinMode(13, OUTPUT);

   parallel do
       loop do
           digitalWrite(11, HIGH);
           await 1s;
           digitalWrite(11, LOW);
           await 1s;
       end
   with
       loop do
           digitalWrite(12, HIGH);
           await 500ms;
           digitalWrite(12, LOW);
           await 500ms;
       end
   with
       loop do
           digitalWrite(13, HIGH);
           await 250ms;
           digitalWrite(13, LOW);
           await 250ms;
       end
   end

I'm looking for embedded systems developers interested in using Céu.
I can help with all support (i.e. coding) to integrate Céu with your platform.

The distribution of Céu already provides support for Arduino.
Céu is free software and is released under the MIT license.

Homepage: http://www.ceu-lang.org/

Arduino: http://www.ceu-lang.org/wiki/index.php?title=Arduino

Git Repo: http://github.com/fsantanna/ceu/

Thanks,
Francisco
10  Development / Other Software Development / Re: arduino.mk (new arduino makefile, works with 1.0) on: January 30, 2012, 11:27:21 am
Thanks for this Makefile.
It works like a charm here!

-- Francisco
Pages: [1]