I am new to C, though I have programmed everything from the TRS-80 to mainframes, and understand, Basic, Fortran, COBOL and Assembly language. But it’s been a while. I was able to copy the simple line following code and using Atmel Studio get it into my 3Pi. But here’s my questions, and it may expose my ignorance a bit here.
I understand that when I want to set a motor speed, or query the sensor, and refer to them with Polulo’s function name, that Polulo has placed code into the C library.
If I buy a proximity sensor, lets say from Polulo, is that in the library, or will I have to learn bit level code for the sensor and somehow get it into the library? Suppose the sensor was bought from some other manufacturer?
Second, is there a way to get a listing of every function in the library so I can see all the tools available to me?
Last, when I loaded the line follower into the 3Pi it obviously overwrote the Demo code that 3Pi came with. How can I get a copy of that code? My intent here would be to append, at the front of all new code, the Demo code. I understand that would mean selecting at startup of 3Pi whether I wanted the Demo, a Line Follower or a Maze Solver, etc, but that way, unless I run out of room, I could have more than one program available to me at all times I wanted to run it through its paces.
Thanks.
Excuse me if the questions are at the newbie level, which I truly am in robotics and C, but if you can direct me to a source where I could learn more about these things that would be great too.