Skip to content

Commit

Permalink
Readme fix and variable name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGreensWorkshop committed Jan 19, 2023
1 parent 9072419 commit 2122959
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ I was looking to add the DRO feature to my small milling machine. I wanted to us

### Compilation

1. Make sure you are using the patched version of Pico SDK as mentioned below.
- **Disabling DTR check for USB CDC**, As we are going to use TouchDro App, we need to disable the DTR check for the USB CDC connection. [PR](https://github.com/raspberrypi/pico-sdk/pull/932) is already merged into the [Pico SDK's develop branch](https://github.com/raspberrypi/pico-sdk/tree/develop). Please ensure that you are using it. I think it will be released with SDK version 1.4.1.
- **Setting as self-powered USB device**, Since the circuit is designed as a self-powered USB device, to tell the USB host that we are not draining power from it, we need to set the attribute called bmAttributes in the USB configuration descriptor. This is the [PR](https://github.com/raspberrypi/pico-sdk/issues/1104) that I opened. I think it will be released with SDK version 1.5.0.
1. Make sure you are using the [Pico SDK's develop branch](https://github.com/raspberrypi/pico-sdk/tree/develop).
- **Disabling DTR check for USB CDC**, As we are going to use TouchDro App, we need to disable the DTR check for the USB CDC connection. Related [PR](https://github.com/raspberrypi/pico-sdk/pull/932) is already merged into develop branch.
- **Setting as self-powered USB device**, Since the circuit is designed as a self-powered USB device, to tell the USB host that we are not draining power from it, we need to set the attribute called bmAttributes in the USB configuration descriptor. Related [PR](https://github.com/raspberrypi/pico-sdk/pull/1105) is already merged into develop branch.
1. Open the project in VS Code because it adds SDK to the environment string. (Check the [.vscode/settings.json](https://github.com/MrGreensWorkshop/RasPiPicoSDK_PicoDRO/blob/main/.vscode/settings.json) file for details.)
- Or add PICO_SDK_PATH to your environment string.
1. Compile using build.sh
Expand Down
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ int main(void)
// As long as there are two pins in a row, any two pins can be assigned for each axis.
// X:A X:B Y:A Y:B Z:A Z:B
const char pinList[] = {16, 17, 18, 19, 20, 21};
const char PinCnt = sizeof(pinList);
const char axisCnt = PinCnt / 2;
const char pinCnt = sizeof(pinList);
const char axisCnt = pinCnt / 2;
const char axisNames[] = {'X', 'Y', 'Z'};
// readInterval < sendIntervalMin < sendIntervalMax
// I didn't test the minimum response time of the system.
Expand All @@ -52,7 +52,7 @@ int main(void)
qdec.init(pio0);

int x = 0;
for(int i = 0; i < PinCnt; i++) {
for(int i = 0; i < pinCnt; i++) {
gpio_init(pinList[i]);
gpio_disable_pulls(pinList[i]);
if (i % 2 == 0) {
Expand Down

0 comments on commit 2122959

Please sign in to comment.