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

Yubowu2 onboarding #27

Open
wants to merge 6 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
11 changes: 11 additions & 0 deletions Firmware/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Firmware</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
4 changes: 2 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 blink_LED P0_4
/*
* COMMON PIN OBJECT DECLARATIONS
*/
Expand All @@ -36,7 +36,7 @@ extern DigitalOut led2;
extern DigitalOut led3;
extern DigitalOut led4;
// PROJECT 1 - You can declare a DigitalOut object here

extern DigitalOut blinkLED;
/*
* BOARD SPECIFIC PINS
*/
Expand Down
3 changes: 3 additions & 0 deletions Firmware/project_1/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <mbed.h>
// PROJECT 1 - Include something here!
#include "pins.h"
#include "peripherals.h"
#include "can_struct.h"
#include "CAN/can_id.h"
Expand Down Expand Up @@ -43,6 +44,7 @@ void setup() {
//set up LEDs and turn them all off
common.setupLEDs(&led1, &led2, &led3, &led4);


//Set Callbacks:
//These are side tasks (up to 8) that are run independently of the main
//algorithm / purpose of this board such as the heartbeat.
Expand Down Expand Up @@ -98,6 +100,7 @@ int main() {
//task 1
if(timing.tickThreshold(last_task_1_time, TASK_1_RATE_US)){
//PROJECT 1 - add code here to actually make the LED blink
blinkLED.write(blinkLED.read() == 0 ? 1 : 0);
}


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 @@ -22,4 +22,6 @@ DigitalOut led1(P_LED1);
DigitalOut led2(P_LED2);
DigitalOut led3(P_LED3);
DigitalOut led4(P_LED4);
DigitalOut blinkLED(blink_LED);

// PROJECT 1 - You can instantiate your DigitalOut object here
1 change: 1 addition & 0 deletions Hardware/LED_blinker/#auto_saved_files#
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Users/yubowu/Projects/SolarCar/ElecOnboarding23/Hardware/LED_blinker/_autosave-LED_blinker.kicad_sch
1,983 changes: 1,983 additions & 0 deletions Hardware/LED_blinker/LED_blinker.kicad_pcb

Large diffs are not rendered by default.

Loading