DIY : How To Code A Project In Arduino (for beginners) – Tyler Suard – Medium
- Know what you want to do. Make a list of stuff you’d like it to do, and make sure you buy all the stuff you need to make it happen. Sensors, doodads, whistles, manure piles, etc.
- Make a plan. Make sure it has nothing to do with invading Russia in the wintertime.
- Steal a lot.
- Find a youtube tutorial for a project kinda like yours. Swipe its code by doing a copy and paste into your IDLE (the Arduino code writing software).
- Find another one. Steal the bits you need from its code.
- Keep doing this until your project is complete. It should be a hodgepodge of a bunch of other projects thrown together. NOTE: there are two parts to any Arduino code. The SETUP section and the LOOP section. Imagine you’re at a race. The setup section is where you add all the necessary parts to your car, engine upgrades, tires, etc. The loop section is when you’re actually moving down the racetrack. If you steal bits from one project to put them into another project, make sure that code goes to the right section. Don’t ever put Setup section code into a loop section.
And let me know if you have any questions!