drieverflows / github-slideshow

A robot powered training repository :robot:
https://lab.github.com/githubtraining/introduction-to-github
MIT License
0 stars 0 forks source link

servo with hcsr04 ultrasonic sensor issue #2

Open drieverflows opened 3 years ago

drieverflows commented 3 years ago

Hi all,

Im pretty new to coding and arduino but I managed to copy/paste some code together. However, when i want to upload to my UNO i get this error:

expected unqualified-id before '{' token

cant seem to find out where the actual problem is. issue lies with the last {

` long microsecondsToCentimeters(long microseconds)

{

 // The speed of sound is 340 m/s or 29 microseconds per centimeter.

 // The ping travels out and back, so to find the distance of the

 // object we take half of the distance travelled.

 return microseconds / 29 / 2;

}

//This sub-routein is what dictates the movement of the servo

void sweep(int NUM_OF_CYCLES);

{`
github-learning-lab[bot] commented 3 years ago

Step 2: Turn on GitHub Pages

:tada: You're now the proud manager of this issue! Now that you've assigned yourself, people who drop by know that they're welcome to participate, but you'll be carrying this issue across the finish line. :sunglasses:.

Let's use GitHub Pages

Now, on to business! GitHub Pages allow you to serve a static site from a repository. We've filled this repository with some site content, but the rendered site isn't visible right now. Let's change that.

:keyboard: Activity: Enable GitHub Pages

  1. Click on the Settings tab in this repository
  2. Scroll down to the "GitHub Pages" section
  3. From the "Source" drop down, select main branch

Note: Even though you'll see an option to choose a theme, do not apply a theme at this point. We've protected the code so you can't make unintended changes. You'll have the opportunity to apply a theme when the course is completed.


I'll respond in this issue when I detect GitHub Pages has deployed your site.

Turning on GitHub Pages creates a deployment of your repository. I may take up to a minute to respond as I await the deployment.