> 1. At the lowest level, we send pulses to the servo. servo_set() (now
> called servo_move ;) could be the major API.

servo_move() tells the servo where to go. yes this is the major API.

The other level is the ISR that controls the pulses.

> This is close to
> servo_rc_master (but I don't understand what 'master' means in this
> name). servo_rc would be a good name and we could create other ones
> with similar interfaces for other servo's. This libraries should
> provide the most basic features to control the servo and be efficient.

Your PIC could be a slave device (rc_servo_slave.jal) which is plugged
into your radio receiver to receive pulses. Someday I'll make a lib
for that :)

Yes, separate servo min/max will obviously be optional.

> 2. On top of this some advanced features like ranges per servo, call
> with percent in stead of byte value. Maybe even 'reverse' should be in
> here and not the (1).

I was thinking about using percent, but it lowers resolution and adds
code. I could make a servo_move_percent().

> 3. above this what you call REPL and where servo_rc_master_dedicated
> is an example of (and unlike the name suggests, it is an i2c slave
> library). IMO this should not be a library but a project or sample.
> Just the i2c interface as a library has no value as far as I can see -
> you either use it as is (and then it's a project/sample), or need to
> adapt it if you require other features too (and it is a bad habit to
> put application-specific stuff in libraries).

What's wrong with the filename servo_rc_master_dedicated?

servo_rc_master_dedicated is the library used in the master PIC to
control a dedicated PIC slave device.
16f877a_servo_rc_master_dedicated_master_i2c.jal

servo_rc_master_dedicated could also contain a serial example.
Currently there are procedures named servo_rc_is_ready_i2c(). Later
there may be servo_rc_is_ready_serial()

The other part of it is
16f877a_servo_rc_master_dedicated_slave_i2c.jal. This will be your
slave PIC.

> As I said: the basic servo lib looks good. It can be better organized though.
Yep, just let me know what to organize.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to