Jump to content

Jigar4Electronics

Members
  • Content Count

    8
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Jigar4Electronics reacted to veimmone in 3D model of Stellaris LaunchPad   
    Hi all,
     
    I created a 3D model of the Stellaris LaunchPad and thought I could share it, so here goes:
     
    https://dl.dropboxusercontent.com/u/2496393/StellarisLaunchpad.STEP
    (attaching .STEP files is not allowed, so Dropbox for now)
     
    I included all components I thought had some external relevance (and the chip itself for looks). All the pin positions are according to the LaunchPad manual, so they should be accurate. Other positions have been measured with a caliper, but as always - trust but verify. Dimensions of the pins themselves (apart from height) should not be trusted, they're mostly for looks.
     
    If you need it in another format, ask and you might receive.
    StellarisLaunchpad.STEP
  2. Like
    Jigar4Electronics reacted to bluehash in Get your Booster Packs Sponsored - $10   
    Stellarisiti will be glad to sponsor your initial Booster Pack[bP] development. $10 will be awarded to you to make initial PCBs or purchase parts. It's not much, but it is an incentive. A max of two BPs will be sponsored/month.
     
    This is the same as the 43oh concept. Not any rules or anything, but if many people are interested, I'll sponsor it.
  3. Like
    Jigar4Electronics reacted to bluehash in newbie question! how do I use UARTprintf with floats?   
    Can you post your code.. or zip file. I'll see what I can do.
  4. Like
    Jigar4Electronics reacted to Bingo600 in newbie question! how do I use UARTprintf with floats?   
    Did you remember to let str  point at a something valid ?
    Using just str would garble something ...... Whatever str i pointing at ...
     
     
     
    { char buffer[20] , *str; str = buffer; ftoa(g,str) } or - just plain { char buffer[20];  ftoa(g,buffer); }    
     
    Ohh btw ... I didn't really look at the ftoa() , but shouldn't that generated string be terminated with a '\0' before returning
     
     
    /Bingo
  5. Like
    Jigar4Electronics reacted to bluehash in newbie question! how do I use UARTprintf with floats?   
    What error do you get?
  6. Like
    Jigar4Electronics reacted to dellwoodbu in newbie question! how do I use UARTprintf with floats?   
    UARTprintf does not yet support floats directly.
     
    A couple of options exist.  
     
    1) use sprintf or similar from the standard 'C' libraries to do the float to string conversion into a character array and then use %s with UARTprintf to put the float (which is now stored as a string in the array) on the UART.
     
    2) Do a little bit of casting and multiplying.  cast the float to a integer.  Call this the integer part.  multiply the float by something like 1000 to get three decimal points of precision.  cast this new number to an integer again and now subtract off the integer part * 1000. Call this the fraction part.  Then with UARTprintf do "%d.%03d", IntegerPart, FractionPart.
     
    Dexter
  7. Like
    Jigar4Electronics reacted to aBUGSworstnightmare in newbie question! how do I use UARTprintf with floats?   
    Hi, 
     
    or do it like this and stay with UARTprintf only. 
     
    aBUGSworstnightmare
     
    //***************************************************************************** // //! \brief Float to ASCII //! //! Converts a floating point number to ASCII. Note that buf must be //! large enough to hold //! //! \param f is the floating point number. //! \param buf is the buffer in which the resulting string is placed. //! \return None. //! //! \par Example: //! ftoa(3.14) returns "3.14" //! // //***************************************************************************** void ftoa(float f,char *buf) { int pos=0,ix,dp,num; if (f<0) { buf[pos++]='-'; f = -f; } dp=0; while (f>=10.0) { f=f/10.0; dp++; } for (ix=1;ix<8;ix++) { num = (int)f; f=f-num; if (num>9) buf[pos++]='#'; else buf[pos++]='0'+num; if (dp==0) buf[pos++]='.'; f=f*10.0; dp--; } }
  8. Like
×
×
  • Create New...