Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
hmmm apparently I can't spell the word 'drool' . . . so in my defence, I claim its a real word:http://www.urbandictionary.com/define.php?term=drewl
As for the propeller, my complaint is that it is weak in I/O and UART
static UInt16_T Distance_CM=0;static Mutex Distance_Access_Mutex;void PingTask(void){ UInt32_T timer_value_nanoseconds=0; //or microseconds or whatever for(;;) { ResetTimer(); SendPulse(); StartTimer(); BlockTask(); //In FreeRTOS you can put an upper limit on the amount of time to block //Processor runs other tasks while waiting timer_value_nanoseconds = StopAndReadTimer(); timer_value_nanoseconds = ConvertTimeToDistance(timer_value_nanoseconds); //no sense it wasting space LockMutex(&Distance_Access_Mutex); Distance_CM = timer_value_nanoseconds; // might want to saturate timer_value_nanoseconds and avoid overflow. UnlockMutex(&Distance_Access_Mutex); }}UInt16_T getPingDistanceCM(void){ UInt16_T return_value=0; LockMutex(&Distance_Access_Mutex); return_value = Distance_CM; UnlockMutex(&Distance_Access_Mutex); return return_value;}//Set up your interrupt function... not exactly syntactically correct but I'm lazy at the moment_Interrupt (Whichever_PIN){ Unblock(&PingTaskHandle);}
Like you said you won't need another task to out put to a servo, you just need to set up the hardware and then all you have to do is make a function call that calculates from engineering units to raw units and writes that value to a register to change the PWM.
Or just throwing a second (or third) microcontroller onto the board that only handles the servos based on a simple command from the main mcu.
In the future I plan to write much better servo software that doesn't require wasting ~1.5ms per servo (like on the $50 robot). I have ideas, but not the time to try them out. It will probably involve timers and interrupts .
Also, I decided I won't be shipping international directly, ever. Too much effort and shipping costs. But before you freak out, I already have an international distributor that I'm in the talks with. Those who are international will probably have to wait another ~month or so as I work out the details. Hopefully they can offer lower international shipping costs . . .
Anyway, I am setting up extra bonus features on the Axon. I will have a .hex file, that if you upload it, turns the Axon into a servo controller (up to ~40 servos) that can be used directly with a PC or anything else that has serial or USB.I am also writing code that turns the Axon (also a .hex) directly into a highspeed data logger.Don't remember if I mentioned this before or not, but the Blackfin camera interface code is done as well.And I'm up for more ideas if anyone has any.The documentation and tutorials are almost done. I'll release them in about two weeks.
How much has changed since the last version? (A picture would be awesome)
For the servo control, will their be functions for modifying the timing and speed of a servo as well as just position?
Admin:In the future I plan to write much better servo software that doesn't require wasting ~1.5ms per servo (like on the $50 robot). I have ideas, but not the time to try them out. It will probably involve timers and interrupts . . .
QuoteAdmin:In the future I plan to write much better servo software that doesn't require wasting ~1.5ms per servo (like on the $50 robot). I have ideas, but not the time to try them out. It will probably involve timers and interrupts . . .Here's a good starting pointhttp://www.societyofrobots.com/robotforum/index.php?topic=541.0