Go to Post The spirit of the game, and the game are essentially two different things. - ttldomination [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-12-2007, 23:39
whitetiger0990's Avatar
whitetiger0990 whitetiger0990 is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Mar 2006
Rookie Year: 2006
Location: Earth
Posts: 157
whitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of lightwhitetiger0990 is a glorious beacon of light
Re: C coding

If you have done any sort of programming before, learning C will be a breeze. Programming logic translate directly from language to language (usually). The only thing you need to do is get used to the syntax of the language. Control structure logic will be mostly the same. (while, for, if, etc).

By looking at the links said previously, you can get a handle of what's going on. And if you read the error messages, you'll be able to fix what's going on. (Don't forget ;s)

Like likevanoort said, you should strive to have a fluid system between the driver and the bot. But also remember that you cannot solve all mechanical problems through programming (so, it's probably a good idea to stay in the design and build development loop, motors can only take so much rigorous testing). Everything they request might not be able to be implemented (and if they aren't a programmer, they probably won't know why). Be sure to talk with the people making the requests, and make sure they are specific in their requests. I've gotten quite mad when I was only told "This doesn't feel natural" when it was a physical problem which I had been struggling with for long before they showed up, had their epiphany, and told me to fix it. In retrospect, I should have kept them in the development loop, but still. As a programmer, you shouldn't disregard all requests, but if you know right then and there they won't work, explain. If you figure out later they won't work... explain.

Try to get a basic control background going in your bot code (taking in and processing inputs, figuring out what to do with them, and then outputting). You might not be able to do specific things without a good portion of the bot first, but you should be able to get it to drive. Preseason, figure out how to use sensors, they make life much simpler (and it will show in your auton). =)

Oh, also, if your team doesn't already know, make sure they know programming takes time, and can't be shoved into a couple days of the season. The bot is nothing but a nice looking paperweight without programming.
__________________
print$q=chr(ord($q)+$1)while("7443-0201-8465130105-12-03135-82482113-06-7672-070208-0613-70"=~/(-?\d\d)/g);
Reply With Quote
  #2   Spotlight this post!  
Unread 20-12-2007, 15:18
diesel's Avatar
diesel diesel is offline
Registered User
FRC #2077
 
Join Date: Oct 2007
Location: Wisconsin
Posts: 50
diesel has a spectacular aura aboutdiesel has a spectacular aura about
Re: C coding

Sorry if this is in the wrong thread.
I am also looking to learn C before the seanson starts.
My question is: Is there a compiler I can download to learn C with?
Any help will be great.
__________________
Design. Build. Dew.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-12-2007, 16:05
blaxbb blaxbb is offline
Ohio State Engineering Scholar
AKA: Brian Barrett
FRC #2331
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Vernon, New Jersey
Posts: 131
blaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really niceblaxbb is just really nice
Re: C coding

I use dev c++ http://www.bloodshed.net/devcpp.html

It's an IDE which comes with both C and C++ compilers, and is fairly easy to set up.
__________________
"Whether you think you can or think you can’t, you’re right." - Henry Ford
www.vthsrobotics.org
Reply With Quote
  #4   Spotlight this post!  
Unread 20-12-2007, 16:07
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: C coding

I would recommend Easy C or if you are going to have a basic robot such as tank drive with a basic manipulator Mplab is pretty easy to learn the basics. It only took me about a week to learn most all the basics needed to program in regular C.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-12-2007, 09:11
diesel's Avatar
diesel diesel is offline
Registered User
FRC #2077
 
Join Date: Oct 2007
Location: Wisconsin
Posts: 50
diesel has a spectacular aura aboutdiesel has a spectacular aura about
C compiler

I know a little easy C from programing my vex robot, not a lot.
I also am learning PASCAL in my computer science class.
Thank you for all your help.
__________________
Design. Build. Dew.
Reply With Quote
  #6   Spotlight this post!  
Unread 21-12-2007, 09:42
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: C coding

You can download easyC Pro at http://www.intelitekdownloads.com
and you can have a mentor e-mail us to request your team CD-Key.
If you are a 08 Rookie we can create a team key to get you started.

If you have a Vex robot can you prototype code in Vex mode to learn
how things work.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
Reply With Quote
  #7   Spotlight this post!  
Unread 21-12-2007, 10:01
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: C coding

Welcome to programming! I just learned how to program a few months ago, and I'm pretty good now. If you're anything like me, then you learn by a hands on example. To get started, download the robot code off of ifirobotics.com; while at IFI, download the IFI_Loader. Next you'll need MPLAB with the C18 compiler. The main program you'll program with is User_Routines.c Just look at the code and try to figure out how it works. pwm?? are the PWM outputs on the controller. 127 is center/off. Relays are H bridges, so fwd triggers one relay, and rev triggers the other relay. If you have both on or both off, whatever you are controlling will remain off. You must have a 1 and 0 or a 0 and 1 to turn something on. In robotics, you will usually leave rev at 0 and then turn fwd on and off because of the polarity of the devices. Controls are pretty simple too, it's all in user_routines.c Good luck with programming and feel free to contact me.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote
  #8   Spotlight this post!  
Unread 21-12-2007, 14:13
Ken Leedle Ken Leedle is offline
College Student
FRC #0706 (CyberHawks)
Team Role: Alumni
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Wisconsin
Posts: 37
Ken Leedle will become famous soon enoughKen Leedle will become famous soon enough
Re: C coding

Quote:
Originally Posted by RyanN View Post
pwm?? are the PWM outputs on the controller. 127 is center/off. Relays are H bridges, so fwd triggers one relay, and rev triggers the other relay.
Just a minor correction: The Victors translate the RC style PWM signal (~1ms-2ms pulse) into a straight duty cycle (0-100%) and direction signal for controlling the actual FETs in their H-Bridge. The Spikes are configured similarly to an H-Bridge, but use relays instead of FETs. Relays are electromechanical switches. Notice the audible click when they are actuated.

The MPLab IDE is fairly easy to set up and use from my experience. The code FIRST gives you takes a lot of the learning curve of programming micro-controllers out of the picture and allows you to code basic functionality without knowing the particulars of the device. It may seem intimidating at first because of the sheer volume of code, but once you figure out which sections you need to be concerned with you should find programming the robot controller straightforward.

-Ken
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photoswitch coding magical hands Programming 0 17-01-2006 21:20
coding problem!! HELP! wildabyss Programming 7 21-02-2005 21:48
Pneumatic Coding Problem lasoaaro Pneumatics 11 18-02-2005 12:11
coding a potentiometer incognito_NICK Programming 5 14-02-2005 15:56
Coding conventions Anthony Kesich Programming 20 08-01-2004 10:50


All times are GMT -5. The time now is 23:03.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi