Microcontrollers > Data Logging

Arduino for beginners

<< < (2/8) > >>

Bruce S:
I am slowly getting back to doing just these little flow-chart plannings that makes life so much easier.

Operahouse. Yep !! It always "your" fault.  :o.
What's worse , At work I write How-to-do and procedures that are so detailed I get told even a FF can do them.

So know I've gone back to taking my 30mins of lunch time to writing those back out.

Once the pre-plan (flow chart)  is complete, I'll "REM" them down to fit in the available memory.
One of the items my drafting teacher taught was "P7" "P Poor Planning Promotes P Poor Performance" 

Cheers
Bruce S

OperaHouse:
I just attack the problem and start writing code.  Any preconceived ideas will likely be wrong anyway. I just get a little section to work and then just start adding to it.  Just get something to work and it will encourage you.  It is testing by increment and the more times you test each feature, the more likely a problem will show up. Testing a really big program and trying to diagnose an issue can be formidable.  Sending out variable data to a serial screen makes life easier.

DamonHD:
Totally agreed: except for big projects, eg $10k or 10+ plus people, doing it a bit at a time is the way to go.  It's how how I do most of my personal projects, and some of the professional ones.

Arguably the fashionable term for bit-at-a-time development is "agile"!

Agile is good for big projects, too.

Rgds

Damon

george65:

I have seen here and other places many time where people talk about a project/ application and only provide the code for the arduino.
When asked for schematics I have been told I need to learn for myself so I can maintain or modify the setup.

I have looked and looked but I have yet to find anything that tells me how to work out the schematic/ components and layouts of a setup from the code alone.  On the arduino site they give you the schematic and the code which I have been able to make and modify a few different useful things now.
Without that info I'm fked. I figure there has to be a way to do it because I see so many times people only post the code and not the connections or components. there has to be a way to figure it out or putting up the code would be a waste of time. 

Can someone please tell me what I have to learn, how to figure out a project components and connections just from the code or link somewhere that one can learn how this is done?

frackers:
I don't use the Arduino IDE to write code (I'm old school)  but the first thing I do with a project is put in some comments that describe what connects to what. This is to help me as much as anyone else because you can guarantee  that after a few months I've forgotten what goes where...
Here is an example from my weather station which can use one of 1-wire chips, DHT-22 or BME280 to measure temperature and humidity depending on how its configured:

// Connections to Arduino                    DHT-22        BME280       1-wire
// pin  4 Ground
// pin  8 port PD5 (Arduino pin D5)          supply        supply       supply
// pin  9 port PD6 (Arduino pin D6)          data          gnd          data (defined in cfg/cfg_1wire.h)
// pin 24 port PC5 (Arduino pin ADC5/SCL)    n/c           scl          n/c
// pin 23 port PC4 (Arduino pin ADC4/SDA)    gnd           sda          gnd
// pin  7 port PD4 (Arduino pin D4) as rain tipper input
// pin 12 port PB1 (Arduino pin D9) as output for 433MHz transmitter
// pin 14 port PB3 (Arduino pin D11) as wind sensor input
// pin 15 port PB4 (Arduino pin D12) as DTR signal to wind sensor
// pin 16 port PB5 (Arduino pin D13) as onboard LED


// DHT22 connections
// Pin 1 - vcc
// Pin 2 - data
// Pin 3 - n/c
// Pin 4 - gnd

// BME280 connections
// Pin 1 - vcc
// Pin 2 - gnd
// Pin 3 - scl
// Pin 4 - sda


I agree that a lot of 'amateur' projects don't have anything like enough documentation or even comments in the code. For example which makes more sense (identical code is generated by the compiler in each case)
x++;
or
x++;           // increment x
or
rain++;           // increment the number of tips the rain sensor has generated

I rest my case....

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version