| ... | @@ -51,6 +51,32 @@ int main() |
... | @@ -51,6 +51,32 @@ int main() |
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Note
|
|
|
|
You can also send data from the PC to the microcontroller.
|
|
|
|
This can be done through the *scanf()* function:
|
|
|
|
```cpp
|
|
|
|
#include <Common.h>
|
|
|
|
|
|
|
|
using namespace miosix;
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
while (true)
|
|
|
|
{
|
|
|
|
scanf("%d", &i);
|
|
|
|
if (i > 10)
|
|
|
|
{
|
|
|
|
TRACE("Hello Skyward! \n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
## Compile with SBS
|
|
## Compile with SBS
|
|
|
You should also add the entrypoint configuration to `sbs.conf`.
|
|
You should also add the entrypoint configuration to `sbs.conf`.
|
|
|
|
|
|
| ... | | ... | |