uint8_t *havimo_raw(id_t id) {
uint8_t packet[] = {id, 3, 0x0F};
uint16_t count;
uint8_t len = 0;
dx_sendpacket(packet, dx_readcallback);
count = 0;
read_n = 0;
if(!read_error && len == read_n)
return read;
else
return NULL;
}
void havimo_image(void)
{
int i = 0;
uint8_t *data = havimo_raw(HAVIMO);
for(i=0;i<160*120;i++) {
printf("%d", data[i]);
}
}
gozita007 wrote:Hi i recently started looking at the example.c and i wanted to slowly move a leg up (then down to sort of simulate walking). I saw the case 'a' and 'q' lines which do the servo[i]position++ or --, and used those as examples to figure out a way to move the legs up and down.
for(int alpha = 0; alpha <= 154; alpha++)
{
s.servo[11].position--;
s.servo[13].position--;
//timer_delay(1);
}
I wanted the servos to be at roughly 45 degree (which is around 154 in servo position). When i tried to add the timer_delay line it doesn't seem to work the way i wanted(which is to slowly increment or decrement the servo position). When i took out the delay, it would just go straight the 45 degree position, shaking the robot and causing it to fall over. Is there a way to slowly increment servo positions with a different timer_delay?
Hi i recently started looking at the example.c and i wanted to slowly move a leg up (then down to sort of simulate walking). I saw the case 'a' and 'q' lines which do the servo[i]position++ or --, and used those as examples to figure out a way to move the legs up and down.
for(int alpha = 0; alpha <= 154; alpha++)
{
s.servo[11].position--;
s.servo[13].position--;
//timer_delay(1);
}
I wanted the servos to be at roughly 45 degree (which is around 154 in servo position). When i tried to add the timer_delay line it doesn't seem to work the way i wanted(which is to slowly increment or decrement the servo position). When i took out the delay, it would just go straight the 45 degree position, shaking the robot and causing it to fall over. Is there a way to slowly increment servo positions with a different timer_delay?
for(int alpha = 0; alpha <= 154; alpha++)
{
s.servo[11].position--;
s.servo[13].position--;
dx_set_stance(&s);
timer_delay(1);
}
bash-3.2$ ls
bin libbioloid-latest.tgz
doc libcompat
example libcompat-latest.tgz
libavr psx-latest.tgz
libavr-2009-09-17-r1396.tgz tools
libbioloid
bash-3.2$ cd tools/
bash-3.2$ ls
LICENCE dxpktchk.c rom2bin
Makefile programmer.c
das robotis_decrypt.c
bash-3.2$ make
gcc -Wall -g -std=gnu99 -Os -I../libcompat -lm programmer.c ../libcompat/compat/console.c ../libcompat/compat/serial.c -o programmer
programmer.c: In function ‘main’:
programmer.c:112: error: ‘B1000000’ undeclared (first use in this function)
programmer.c:112: error: (Each undeclared identifier is reported only once
programmer.c:112: error: for each function it appears in.)
make: *** [programmer] Error 1
bash-3.2$
bryanjeal wrote:
- Code: Select all
programmer.c: In function ‘main’:
programmer.c:112: error: ‘B1000000’ undeclared (first use in this function)
If anyone can share some insight that would be appreciated!
-Bryan
limor wrote:- I can't find the source code for dx_set_torque_enable(). I've run grep on all files but it doesn't appear anywhere except for in example.c (which compiles, hence it must be somewhere) and in libbioloid.html . where is it hidden ?
limor wrote:The documentation and code mentions the M1 replacement firmware for the AX12. Can you share this code?
RandomMatt wrote:limor wrote:The documentation and code mentions the M1 replacement firmware for the AX12. Can you share this code?
I don't want to give it away. It was several months of work.
The M1 firmware requires a PSX-B to authenticate against before it'll let you switch the torque on. I'll stick a copy of the firmware in psx-latest.tgz at somepoint over the next week - but you'll need to get a PSX-B board to use it sensibly.
limor wrote:I would like to write a very particular firmware for AX12 that will allow me to read/write to the robot servos at 200Hz+.
It would be great is if you could share your knowledge of
(a) the process of taking a Atmega8 hex file and converting/encrypting it to AX12 bootloader flash format (is this required?)
(b) code for working the PWM signals to the MOSFETs
(c) reading the POT and toggling any Atmega8 pin that does something on the AX12