Ok so I am having the SAME problem. I can't see if my float calculations are working or not. Did you see the README in the IFI released camera code:
Code:
www.InnovationFirst.com
1/8/2004
- Removed printf_lib.c and printf_lib.h - now using <stdio.h>, compiler needs -nw=2066 to suppress warnings
- Added user_camera.c and user_camera.h - to remove code from build -> remove the _USE_CMU_CAMERA macro
- Replaced file named PicSerialDrv with user_serialdrv
- Note: when using a 'printf' use a '\r' rather than a '\n' with the new compiler (v2.4)
So I am not using print_f.lib. I am using stdio.h. I am doing the same thing as
miketwalker but I don't get anything to the screen while trying to use floats.
Has anyone else got any input? I am using MPLAB, not CBOT, and the new 2.4 version complier....
I spent all day wondering if our float calculations are actually working.
Is float supported in this PIC?
Can I even do a calculation like this?
If WHEELBASE = 485.35 mm?
Code:
pos_mm_theta = (pos_mm_Left_Encoder_Count - pos_mm_Right_Encoder_Count)/WHEELBASE;
posx_mm = pos_mm_distance * sin(pos_mm_theta);
posy_mm = pos_mm_distance * cos(pos_mm_theta);
Quote:
|
Originally Posted by Astronouth7303
If you're using the new compiler, I believe the printf() included in that works with floats (check the documentation in .\mcc18\doc).
|