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

Ashwatk2 onboarding #37

Open
wants to merge 4 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: 1 addition & 1 deletion .mcuxpressoide_packages_support/info.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#MCUXpresso IDE
#Mon Sep 04 18:51:32 CDT 2023
#Wed Sep 27 20:32:15 CDT 2023
product.name=MCUXpresso IDE v11.7.0 [Build 9198] [2023-01-17]
product.version=11.7.0
product.build=9198
595 changes: 0 additions & 595 deletions Firmware/project_1/.cproject

This file was deleted.

6 changes: 5 additions & 1 deletion Firmware/project_1/inc/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#define P_LED3 P0_6
#define P_LED4 P0_7
// PROJECT 1 - You can define a pin macro here
#define P_LED5 P0_4
#define P_POT1 P0_8

/*
* COMMON PIN OBJECT DECLARATIONS
Expand All @@ -36,11 +38,13 @@ 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 pot1;

/*
* BOARD SPECIFIC PIN OBJECT DECLARATIONS
Expand Down
10 changes: 9 additions & 1 deletion Firmware/project_1/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
*/

#include <mbed.h>
#include <cstdlib>
// PROJECT 1 - Include something here!
#include "DigitalOut.h"
#include "peripherals.h"
#include "can_struct.h"
#include "CAN/can_id.h"
Expand Down Expand Up @@ -79,6 +81,7 @@ int main() {

CANMessage msg;
bool shutdown = false;
uint32_t rate = TASK_1_RATE_US;
// Main functionality
while (!shutdown) {

Expand All @@ -96,10 +99,15 @@ int main() {
}

//task 1
if(timing.tickThreshold(last_task_1_time, TASK_1_RATE_US)){
if(timing.tickThreshold(last_task_1_time, rate)){
//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
if(timing.tickThreshold(last_task_1_time, rate)){
rate = pot1.read();
}

}

Expand Down
3 changes: 3 additions & 0 deletions Firmware/project_1/src/pins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* PIN OBJECT INSTANTIATIONS
*/

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


/*
Expand All @@ -23,3 +25,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);
30 changes: 23 additions & 7 deletions Hardware/Dev/Template_v0.0/Template_v0.0.kicad_pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {
"board_outline_line_width": 0.09999999999999999,
Expand Down Expand Up @@ -117,7 +118,8 @@
"zones_allow_external_fillets": false,
"zones_use_no_outline": true
},
"layer_presets": []
"layer_presets": [],
"viewports": []
},
"boards": [],
"cvpcb": {
Expand Down Expand Up @@ -301,18 +303,23 @@
"rule_severities": {
"bus_definition_conflict": "error",
"bus_entry_needed": "error",
"bus_label_syntax": "error",
"bus_to_bus_conflict": "error",
"bus_to_net_conflict": "error",
"conflicting_netclasses": "error",
"different_unit_footprint": "error",
"different_unit_net": "error",
"duplicate_reference": "error",
"duplicate_sheet_names": "error",
"endpoint_off_grid": "warning",
"extra_units": "error",
"global_label_dangling": "warning",
"hier_label_mismatch": "error",
"label_dangling": "error",
"lib_symbol_issues": "warning",
"missing_bidi_pin": "warning",
"missing_input_pin": "warning",
"missing_power_pin": "error",
"missing_unit": "warning",
"multiple_net_names": "warning",
"net_not_bus_member": "warning",
"no_connect_connected": "warning",
Expand All @@ -322,6 +329,7 @@
"pin_to_pin": "warning",
"power_pin_not_driven": "error",
"similar_labels": "warning",
"simulation_model_issue": "ignore",
"unannotated": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
Expand All @@ -333,13 +341,13 @@
"pinned_symbol_libs": []
},
"meta": {
"filename": "Template_v0.0_v6.kicad_pro",
"filename": "Template_v0.0.kicad_pro",
"version": 1
},
"net_settings": {
"classes": [
{
"bus_width": 12.0,
"bus_width": 12,
"clearance": 0.2,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
Expand All @@ -353,13 +361,15 @@
"track_width": 0.25,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6.0
"wire_width": 6
}
],
"meta": {
"version": 2
"version": 3
},
"net_colors": null
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
},
"pcbnew": {
"last_paths": {
Expand All @@ -375,6 +385,8 @@
"schematic": {
"annotate_start_num": 0,
"drawing": {
"dashed_lines_dash_length_ratio": 12.0,
"dashed_lines_gap_length_ratio": 3.0,
"default_line_thickness": 6.0,
"default_text_size": 50.0,
"field_names": [],
Expand Down Expand Up @@ -406,7 +418,11 @@
"page_layout_descr_file": "Title_Block.kicad_wks",
"plot_directory": "",
"spice_adjust_passive_values": false,
"spice_current_sheet_as_root": false,
"spice_external_command": "spice \"%I\"",
"spice_model_current_sheet_as_root": true,
"spice_save_all_currents": false,
"spice_save_all_voltages": false,
"subpart_first_id": 65,
"subpart_id_separator": 0
},
Expand Down
Loading