18 Feb
2013
18 Feb
'13
10:30 p.m.
Hi Oberoneurs, I try to "reverse engineer" the arduino language in Oberon07. In arduino speak you create an servo object like this: <code> Servo myservo; // create servo object to control a servo void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } </code> In oberon(07) this would become something like: MODULE Example IMPORT SERVO; VAR myservo : SERVO.servo; BEGIN SERVO.Init(myservo,9) END Example I remember reading an argument of Wirth against object orientation. However the object way, "myservo.atttach(9)" seems more elegant than the modular way. Did I overlook something? Greets, Frans-Pieter