Skip to content
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
11 changes: 11 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ElecOnboarding25</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
1 change: 1 addition & 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.577702461" 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
2 changes: 2 additions & 0 deletions Firmware/project_1/inc/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define P_LED2 P0_5
#define P_LED3 P0_6
#define P_LED4 P0_7
#define P_LED_HEART P0_4
// PROJECT 1 - You can define a pin macro here

/*
Expand All @@ -35,6 +36,7 @@ extern DigitalOut led1;
extern DigitalOut led2;
extern DigitalOut led3;
extern DigitalOut led4;
extern DigitalOut led_heart;
// PROJECT 1 - You can declare a DigitalOut object here

/*
Expand Down
2 changes: 1 addition & 1 deletion Firmware/project_1/inc/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

//task 1 rate
// PROJECT 1 - You can change the macro name to something more descriptive if you'd like
#define TASK_1_RATE_US 1000000
#define BEAT_FREQ 1000000



Expand Down
4 changes: 3 additions & 1 deletion Firmware/project_1/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "CAN/can_id.h"
#include "CAN/can_data.h"
#include "can_buffer.h"
#include "pins.h"


/*
Expand Down Expand Up @@ -95,8 +96,9 @@ int main() {
common.toggleReceiveCANLED();
}

if(timing.tickThreshold(last_task_1_time, TASK_1_RATE_US)){
if(timing.tickThreshold(last_task_1_time, BEAT_FREQ)){
//PROJECT 1 - add code here to actually make the LED blink
led_heart = !led_heart;
}

//PROJECT 2 - use the potentiometer to change the blink rate
Expand Down
1 change: 1 addition & 0 deletions Firmware/project_1/src/pins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ DigitalOut led1(P_LED1);
DigitalOut led2(P_LED2);
DigitalOut led3(P_LED3);
DigitalOut led4(P_LED4);
DigitalOut led_heart(P_LED_HEART);
// PROJECT 1 - You can instantiate your DigitalOut object here
Loading