Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varun Madhan Onboarding Hardware 1 #63

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Firmware/project_1/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<option id="com.crt.advproject.link.memory.load.image.cpp.1854760230" superClass="com.crt.advproject.link.memory.load.image.cpp" value="" valueType="string"/>
<option id="com.crt.advproject.link.memory.data.cpp.326173730" superClass="com.crt.advproject.link.memory.data.cpp" value="" valueType="string"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="true" id="com.crt.advproject.link.memory.sections.cpp.50157822" superClass="com.crt.advproject.link.memory.sections.cpp" valueType="stringList"/>
<option id="com.crt.advproject.link.cpp.multicore.master.1614070032" superClass="com.crt.advproject.link.cpp.multicore.master"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2135286474" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
Expand Down Expand Up @@ -592,4 +593,5 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.crt.advproject.GCCManagedMakePerProjectProfile"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="openCmsis"/>
</cproject>
5 changes: 3 additions & 2 deletions Firmware/project_1/inc/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define P_LED3 P0_6
#define P_LED4 P0_7
// PROJECT 1 - You can define a pin macro here

#define P_LED5 P0_4
/*
* COMMON PIN OBJECT DECLARATIONS
*/
Expand All @@ -36,13 +36,14 @@ extern DigitalOut led2;
extern DigitalOut led3;
extern DigitalOut led4;
// PROJECT 1 - You can declare a DigitalOut object here
extern DigitalOut led5;

/*
* BOARD SPECIFIC PINS
*/

// PROJECT 2 - You can declare a AnalogIn object here

extern AnalogIn pot_1;

/*
* BOARD SPECIFIC PIN OBJECT DECLARATIONS
Expand Down
4 changes: 2 additions & 2 deletions Firmware/project_1/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ int main() {

if(timing.tickThreshold(last_task_1_time, TASK_1_RATE_US)){
//PROJECT 1 - add code here to actually make the LED blink
(led5.read() == 0) ? led5.write(1) : led5.write(0);
}

//PROJECT 2 - use the potentiometer to change the blink rate


AnalogIn potentiometer(P_POT1);
}

shutdown_method();
Expand Down
2 changes: 2 additions & 0 deletions Firmware/project_1/src/pins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

// PROJECT 2 - You can instantiate your AnalogIn object here
AnalogIn pot_1(P_POT1);

/*
* COMMON PIN OBJECT INSTANTIATIONS
Expand All @@ -23,3 +24,4 @@ DigitalOut led2(P_LED2);
DigitalOut led3(P_LED3);
DigitalOut led4(P_LED4);
// PROJECT 1 - You can instantiate your DigitalOut object here
DigitalOut led5(P_LED5);
266 changes: 266 additions & 0 deletions Hardware/prog1/Title_Block.kicad_wks

Large diffs are not rendered by default.

135 changes: 135 additions & 0 deletions Hardware/prog1/fp-lib-table

Large diffs are not rendered by default.

Loading