Commit 5aa9fdaf8eb5c9bebcb839715bcff6d5dad50f62

Authored by Greg Sandstrom
1 parent c77ada867e
Exists in main

initial PIO project creating for nano every, add SD card and RTClib dependencies

Showing 7 changed files with 146 additions and 0 deletions Inline Diff

dirwin-nano-every/.gitignore View file @ 5aa9fda
File was created 1 .pio
2 .vscode/.browse.c_cpp.db*
3 .vscode/c_cpp_properties.json
4 .vscode/launch.json
5 .vscode/ipch
dirwin-nano-every/.vscode/extensions.json View file @ 5aa9fda
File was created 1 {
2 // See http://go.microsoft.com/fwlink/?LinkId=827846
3 // for the documentation about the extensions.json format
4 "recommendations": [
5 "platformio.platformio-ide"
6 ],
7 "unwantedRecommendations": [
8 "ms-vscode.cpptools-extension-pack"
9 ]
10 }
dirwin-nano-every/include/README View file @ 5aa9fda
File was created 1
2 This directory is intended for project header files.
3
4 A header file is a file containing C declarations and macro definitions
5 to be shared between several project source files. You request the use of a
6 header file in your project source file (C, C++, etc) located in `src` folder
7 by including it, with the C preprocessing directive `#include'.
8
9 ```src/main.c
10
11 #include "header.h"
12
13 int main (void)
14 {
15 ...
16 }
17 ```
18
19 Including a header file produces the same results as copying the header file
20 into each source file that needs it. Such copying would be time-consuming
21 and error-prone. With a header file, the related declarations appear
22 in only one place. If they need to be changed, they can be changed in one
23 place, and programs that include the header file will automatically use the
24 new version when next recompiled. The header file eliminates the labor of
25 finding and changing all the copies as well as the risk that a failure to
26 find one copy will result in inconsistencies within a program.
27
28 In C, the usual convention is to give header files names that end with `.h'.
29 It is most portable to use only letters, digits, dashes, and underscores in
dirwin-nano-every/lib/README View file @ 5aa9fda
File was created 1
2 This directory is intended for project specific (private) libraries.
3 PlatformIO will compile them to static libraries and link into executable file.
4
5 The source code of each library should be placed in a an own separate directory
6 ("lib/your_library_name/[here are source files]").
7
8 For example, see a structure of the following two libraries `Foo` and `Bar`:
9
10 |--lib
11 | |
12 | |--Bar
13 | | |--docs
14 | | |--examples
15 | | |--src
16 | | |- Bar.c
17 | | |- Bar.h
18 | | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
19 | |
20 | |--Foo
21 | | |- Foo.c
22 | | |- Foo.h
23 | |
24 | |- README --> THIS FILE
25 |
26 |- platformio.ini
27 |--src
28 |- main.c
29
30 and a contents of `src/main.c`:
31 ```
32 #include <Foo.h>
33 #include <Bar.h>
34
35 int main (void)
36 {
37 ...
dirwin-nano-every/platformio.ini View file @ 5aa9fda
File was created 1 ; PlatformIO Project Configuration File
2 ;
3 ; Build options: build flags, source filter
4 ; Upload options: custom upload port, speed and extra flags
5 ; Library options: dependencies, extra library storages
6 ; Advanced options: extra scripting
7 ;
8 ; Please visit documentation for the other options and examples
9 ; https://docs.platformio.org/page/projectconf.html
10
11 [env:nano_every]
12 platform = atmelmegaavr
13 board = nano_every
14 framework = arduino
15 lib_deps =
16 arduino-libraries/SD@^1.2.4
dirwin-nano-every/src/main.cpp View file @ 5aa9fda
File was created 1 #include <Arduino.h>
2
3 // put function declarations here:
4 int myFunction(int, int);
5
6 void setup() {
7 // put your setup code here, to run once:
8 int result = myFunction(2, 3);
9 }
10
11 void loop() {
12 // put your main code here, to run repeatedly:
13 }
14
dirwin-nano-every/test/README View file @ 5aa9fda
File was created 1
2 This directory is intended for PlatformIO Test Runner and project tests.
3
4 Unit Testing is a software testing method by which individual units of
5 source code, sets of one or more MCU program modules together with associated
6 control data, usage procedures, and operating procedures, are tested to
7 determine whether they are fit for use. Unit testing finds problems early
8 in the development cycle.