-
Notifications
You must be signed in to change notification settings - Fork 403
Version 1: compiles with task met #261
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
base: master
Are you sure you want to change the base?
Conversation
Rosnaky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just a few errors with the spi communication-I think you were missing the right diagram. Let me know if you have questions!
nucleof072rb/Core/Src/main.c
Outdated
| /* USER CODE BEGIN 4 */ | ||
| int readADC() { | ||
| uint8_t command_byte = 0b11000; | ||
| uint8_t tx[2] = {command_byte, 0x00}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nucleof072rb/Core/Src/main.c
Outdated
|
|
||
| /* USER CODE BEGIN 4 */ | ||
| int readADC() { | ||
| uint8_t command_byte = 0b11000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need to fix this as per the comment below
| /* pull cs high*/ | ||
| HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_SET); | ||
| /* clean up and combine rx1 and rx2 */ | ||
| rx[1] = rx[1] >> 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will need to fix as per figure 6.1
nucleof072rb/Core/Src/main.c
Outdated
|
|
||
| float getTimerCounts(float pulse_width) { | ||
| /* clock period is 20,000 so that 1 timer count = 1 microsecond */ | ||
| float timer_counts = pulse_width * 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will need to change multiplier of 1000 as per https://discord.com/channels/776618956638388305/1456736379399573558/1457186617277026606

Bootcamp submission for Tejas Bains