6 Replies - 344 Views - Last Post: 10 January 2013 - 11:38 PM Rate Topic: -----

#1 darwin277  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 10-January 13

Help on writing code

Posted 10 January 2013 - 06:12 AM

Im very new to using C. However, I began doing a project, measuring paper thickness, using parallel capacitors, my aim is to display amount of pages between these plates on a LED display. Im using a arduinoUno as a microcontroller, i have the calculations and value of the components im using, however i am finding it difficult to put in C language, any possible help i can get?
Is This A Good Question/Topic? 0
  • +

Replies To: Help on writing code

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3589
  • View blog
  • Posts: 11,157
  • Joined: 05-May 12

Re: Help on writing code

Posted 10 January 2013 - 06:26 AM

I would first learn how to program in C without taking the controller into account. Once you've picked up enough C, learn how to interface with the controller and that should complete what you need for your project. I believe that this forum has a FAQ for resources for learning C.
Was This Post Helpful? 0
  • +
  • -

#3 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 7802
  • View blog
  • Posts: 13,197
  • Joined: 19-March 11

Re: Help on writing code

Posted 10 January 2013 - 06:44 AM

What have you got so far?

If you haven't written any code, there's not much we can do to help you, but if you've got a start on it, it's a lot easier to make suggestions.
Was This Post Helpful? 1
  • +
  • -

#4 AhmerjavedC++  Icon User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 253
  • Joined: 02-October 09

Re: Help on writing code

Posted 10 January 2013 - 10:27 AM

If you need help finding good C books i suggest you go to a local university or Library. They are usually loaded with stuff that could help you learn C programming to get yourself at an intermediate level
Was This Post Helpful? 1
  • +
  • -

#5 IceHot  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 213
  • Joined: 28-August 12

Re: Help on writing code

Posted 10 January 2013 - 07:05 PM

You might also want to try hitting up cprogramming.com
Was This Post Helpful? 0
  • +
  • -

#6 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Help on writing code

Posted 10 January 2013 - 09:01 PM

Well, you need to say the problem aloud...like this.

1.Measuring paper thickness...hmmm I'm sure it will be a decimal value...so I better take it as a float
2.Well, displaying the number of pages...so that needs to be a counter variable and hence it should be an int

so on...

So, when you do this, you tend to logically form meaningful words in your mind...and then all you need to do then is convert it to the required language code.

Regards,
Raghav
Was This Post Helpful? 1
  • +
  • -

#7 IceHot  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 213
  • Joined: 28-August 12

Re: Help on writing code

Posted 10 January 2013 - 11:38 PM

Oh, and make sure you have that pseudocode thought up before you try the actual code. Trust me: if you don't, you will most likely end up wishing you did...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1