Skip to content

Adding steven's ussensor code#4

Open
jvasquez864 wants to merge 1 commit into
masterfrom
USSensorCleaned
Open

Adding steven's ussensor code#4
jvasquez864 wants to merge 1 commit into
masterfrom
USSensorCleaned

Conversation

@jvasquez864

Copy link
Copy Markdown
Collaborator

Steven's US Sensor code.


*/
#include "stm32f3xx_hal.h"
#include "u_sensor"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be u_sensor.h

}

//Delay 1us x n
void delay_us(uint32_t n) // Or n*72 clock cycles

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n*12

}

//Every 72 clock cycles yields 1 microseconds
return counter/72;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be 12 too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant