![]() |
Re: Inovation First FRC Robot Controller
yes i do have a serial port and a usb converter
|
Re: Inovation First FRC Robot Controller
When i go to open project it does not allow me to choose the mcp file. it lets me choose ifi_frc.X
Is that right? I am using mplabx v1.10, not mplab 8.00 so i dont know if there is any differences. If it makes a difference, my install directory for mplabx v1.10 is: c:\prgram files(x86)\microchip i used default settings for everything i installed Also i dont find this: Project -> Build Options -> Project how do i choose Suit Defaults? And i not sure how to make sure these paths are assinged correctly •Include Path c:\mcc18\h •Library Path c:\mcc18\lib |
Re: Inovation First FRC Robot Controller
Sorry, my directions were for MPLab.
The project you got from Kevin Watson's site is an MPLab project, so if you're using MPLabX you'll need to construct a new project and include/import the .c/.h/.lib files from the Kevin files. |
Re: Inovation First FRC Robot Controller
Ok so i downloaded mplab ide v8.84
will it work on that? i opened the project in it now i just need help configuring it and building it. I can do the coding i just need help to configure it... Can u give me steps please? |
Re: Inovation First FRC Robot Controller
Quote:
|
Re: Inovation First FRC Robot Controller
yes i did
|
Re: Inovation First FRC Robot Controller
ok so i got everything so far to work
i got it to build properly i got it to upload code to the rc Now i need to test it to make sure it really does work. can someone tell me how i can do this? mabye some code? i dont have any joystics so i will have to do something thats robot sided. maybe take an input from a variable resister on an analog input and use that controll a servo? anything that will show me that it works. Can someone help me on this? remember that im using mplab v8.84 Thanks |
Re: Inovation First FRC Robot Controller
An easy test is to set the OI panel lights to different values in the RC code.
Code:
Pwm1_green = 1; //or = 0 |
Re: Inovation First FRC Robot Controller
I would do that but i dont know what the variable names are for the pins.
is there a site or document that will tell me what the variables are? |
Re: Inovation First FRC Robot Controller
You'll find all the names defined in the ifi_frc.h file, which is part of your project.
Most of them can just be set or read directly, however, the Digital I/O pins must be defined as inputs or outputs before you can use them. (defaults are defined in teleop.c). The analog inputs can only be read using the Get_Analog_Value() function. PWM outputs are all: pwm01, pwm02,...pwm16 Relay outputs are all: relay1_fwd, relay1_rev, relay2_fwd, relay2_rev,...relay8_rev Analog inputs are: rc_ana_in01,...rc_ana_in16 (special handling required though) Digital inputs are: rc_dig_in01,...rc_dig_in18 Digital outputs are: rc_dig_out01,...rc_dig_out18 The OI LED names are as I posted earlier. |
Re: Inovation First FRC Robot Controller
when i try to build it i get an error
"could not find definition of symbol "delay" in ile './teleop.o'". i just used: delay(1000) so i can delay the time it takes for the oi switch lights to turn after each other |
Re: Inovation First FRC Robot Controller
Did you just make that function up?
Normally, you don't want to delay any of this code. Because this was used for FRC, there is a built-in safety that will disable the PWM outputs if the code is delayed. In the case of just blinking the OI lights you probably won't notice that, though. The Teleop routine is set to execute every 26.2ms. If you want to time a blink, then just use a counter to toggle the LED value every 38 counts for a one second blink. |
Re: Inovation First FRC Robot Controller
im new to coding so im good with the basics but stuff like counters i dont know what to do.
is there a way to delay things so i can still have operation of pwms? how would i do this? |
Re: Inovation First FRC Robot Controller
I forgot you were using the Watson code rather than the IFI default code.
In Teleop, if you're changing the OI LEDs, then be sure to comment out the line Code:
Update_OI_LEDs();
|
Re: Inovation First FRC Robot Controller
does any one have code that they have used on their robot that i can try?
i will be using mplab 8.84 so please try to give me somthing that will be error free. Thanks |
| All times are GMT -5. The time now is 20:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi