-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Replace travis ci with github action (#13) * Replace travis ci with github action * Fixed boards to board * Fixed indentation error * Update build.yml * Retrive pressure sensor data from MPX5100
- Loading branch information
Showing
5 changed files
with
32 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
on: | ||
# Trigger the workflow on push or pull request, | ||
# but only for the master branch | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- devel | ||
|
||
jobs: | ||
build: | ||
name: Checkout master | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: cd board && sh install.sh | ||
- name: Build PanFLUte firmware | ||
run: cd board && make |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#include "../driver/adc.h" | ||
|
||
|
||
void adcInit(void) { | ||
/* Enable ADC */ | ||
ADCSRA |= (1 << ADEN); | ||
/* Left Adjust Results */ | ||
ADCSRB |= (1 << ADLAR); | ||
} | ||
|
||
/* | ||
|
||
uint8_t adcStart(void) { | ||
ADCSRA |= (1 << ADSC); // Start ADC conversion | ||
loop_until_bit_is_clear(ADCSRA, ADSC); | ||
rawPresureData = ADCH; // Max is 8bit value | ||
uint8_t rawPresureData = ADCH; // Max is 8bit value | ||
|
||
return rawPresureData; | ||
} | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
#include "driver/usart.h" | ||
#include "driver/led.h" | ||
#include "driver/adc.h" | ||
|
||
static FILE mystdout = FDEV_SETUP_STREAM(print, NULL, _FDEV_SETUP_RW); | ||
|
||
int main(void) { | ||
int main(void) { | ||
adcInit(); | ||
usartInit(MYUBRR); | ||
stdout = &mystdout; | ||
while(1) { | ||
printf("%d\n", 21 + 79); | ||
delay_ms(1000); | ||
while(1) { | ||
printf("Should be sensor data: %d\n", adcStart()); | ||
delay_ms(1000); | ||
} | ||
return 0; | ||
} |