#robotics Logs

Feb 20 2013

#robotics Calendar


00:41 RifRaf and found schem, will now try fix the CS pin
00:43 RifRaf hrm, CS is connected to the SS output on the pcb, though a voltage divider with 2 resistors
01:26 rue_bed you dont need the divider if your already on 3.3V
01:26 rue_bed or 3
01:27 RifRaf they must be there for the 5v on the i/o pins rue
01:27 RifRaf is on SO ans SI and SCK as well
01:27 RifRaf cannot get code to compile though :/
01:27 RifRaf learning another command
01:28 RifRaf the reg is outputing 3.3v exacly, the card must be initialising now, no start up delay unless there is no card init
01:28 RifRaf but yet to proove i can do anything with it
01:28 rue_bed I thought your running it on 3V
01:29 RifRaf gmeter.c:25: error: 'SD_CARD' has no member named 'totalSectors'
01:29 rue_bed oops, broken library
01:29 rue_bed maybe that library wasn't tested too well...
01:30 RifRaf stop it rue
01:30 RifRaf its always worked when i used it right
01:30 RifRaf problem will just be me
01:30 rue_bed ok, ok
01:31 rue_bed do yo have anything in your code that has .totalSectors ?
01:31 RifRaf nope
01:31 rue_bed hmm
01:31 RifRaf http://webbot.org.uk/WebbotLibDocs2/46702.html
01:32 RifRaf is on that page and the docs i have here in pdf
01:32 rue_bed it sounds like thre is a struct definition in there for SD_CARD and something is trying to access a value in it called totalSectors, but its not part of the structure
01:33 RifRaf yep, its in the sdcard.h file
01:34 RifRaf ok maybe i should just try write something instead
01:34 rue_bed does the SD_CARD definition have anything LIKE totalsecotors in it?
01:34 RifRaf yes i just said so
01:35 RifRaf uint32_t totalSectors(void) const{
01:35 RifRaf return m_cstr->numSectors;
01:35 rue_bed is it capitalized the same?
01:35 rue_bed oh its a funviotn
01:35 rue_bed odd, it was accessed like a variable from the error
01:36 rue_bed there will be somethingorother.totalSectors()
01:36 rue_bed unless its c++ in which case it'll be somethingorother->totalSectors()
01:37 RifRaf ok, line 25 is where i tryed to use it, and gives error http://pastebin.com/EN3c7NE8
01:37 RifRaf nope this is C
01:37 RifRaf oh shit
01:37 RifRaf thats the issue rue
01:37 RifRaf that doc i posted was c++
01:37 RifRaf cause thats the default for lib
01:38 rue_bed that keeps happening to you :)
01:38 RifRaf hrm ok how did i fix this the last time, see i am using C cause people here said to
01:38 RifRaf maybe i should go back to C++ ?
01:38 RifRaf okok, do you know how to write line 25 in C sir?
01:38 rue_bed int sectors = &sdCard.totalSectors();
01:38 rue_bed change to
01:39 RifRaf thanks will try
01:39 rue_bed int sectors =totalSectors();
01:39 rue_bed and STOP creating variables on the fly!!!!
01:39 RifRaf ok
01:39 rue_bed create all the variables at the top of the fuction
01:39 RifRaf i just needed one quick
01:39 rue_bed then just use them below that
01:39 RifRaf testing only
01:40 rue_bed I dont think you understand what code is run and what is just compier setup, and things dont work right if you mix them
01:40 RifRaf still an issue
01:40 RifRaf yes i know :(
01:41 RifRaf C:\Code\projects\nanoduino\Gmeter/gmeter.c:25: undefined reference to `totalSect
01:41 RifRaf ors'
01:44 RifRaf ok i think that command is not for C, found some C docs http://webbot.org.uk/WebbotLibDocs/34649.html
01:44 RifRaf does not have it
01:44 RifRaf but maybe some other commands will work
01:46 RifRaf actually
01:47 RifRaf the C / C++ issues was for gaits and servos, ima try c++ again for this project
01:48 RifRaf omg it even gave me sample code that that should do something, will try that
01:52 RifRaf rue_bed there is a wallably eating grass on the lawn, very cute
01:58 RifRaf oh yeah, i got something displayed but went away too quick, just with the example
02:02 RifRaf free space = 253168kb , w00t
02:02 RifRaf for 256mb card
02:03 RifRaf have written a file and made dir, will check on pc
02:03 RifRaf space 3880864kb for a 4GB card
02:05 RifRaf rue this is cool, can see the test file on pc card reader showing me folders it made and the loops inside the text file
02:05 RifRaf has support for 16gb and this old homebrew cardreader working fine
02:06 RifRaf now to add accel code back in and get it logging
02:09 RifRaf the sdcard routine thats working currently if anyone wants to see http://pastebin.com/BW4nPAku
02:10 RifRaf and 20000 odd lines written to the 4gb card and read on pc, so happy
02:57 RifRaf accelerometer data going to SD and can read on pc :)
03:17 GuShH_Lap RifRaf: yey
03:17 GuShH_Lap one problem though
03:17 GuShH_Lap you are still talking alone :(
09:25 rue_house GuShH_Lap, so are you
19:56 Applecrisp Afternoon all, I need some help determining the best way to signal a linear actuator. The motor controller need 0-10 volt signal to determine the placement of the actuator. I was thinking digital pot, but I am not sure any ideas?
20:13 dunz0r Applecrisp: Could it work with PWM?
20:14 Applecrisp the controller is looking for a voltage signal from 0 to 10 volts
20:14 Applecrisp 0 being not extended 10 being fully extended
20:36 Applecrisp any ideas?
20:38 dunz0r My idea is PWM, the impedance of cables and such should even the PWM out to an average if you have sufficient frequency
20:44 Applecrisp I am not direct driving the motor I have a motor controller for that, I am controlling to motor controller
20:45 Applecrisp It takes a single analog signal line
20:54 dunz0r Applecrisp: Use a FET controlled by PWM to feed the 0-10V analouge voltage.
20:54 dunz0r That's how I'd do it.
20:54 dunz0r If your PWM frequency is high enough, the impedance will even out the voltage to an average
20:55 Applecrisp OK
20:55 Applecrisp that makes sense
20:55 Applecrisp like a mosfet
21:01 theBear even if it isn't high enough tiny inductor and cap at the receiving end should clean it up
21:09 Applecrisp that sounds good