Randomised function for Arduino/C++ robot. Convert JavaScript
- or -
Post a project like this1633
£40(approx. $50)
- Posted:
- Proposals: 7
- Remote
- #2567274
- Awarded
Machine Learning| Computer Vision | Image Processing | Backend development | Python | Javascript | Node | Django |Azure
Lahore
3004107187040424555552551097298349231054573172840
Description
Experience Level: Entry
Estimated project duration: 1 - 2 weeks
Hello
I am a fairly competent JavaScript developer and have a function working to control a robot vehicle.
I need the code or functionality converting to C++ to upload to an Arduino robot.
The premise of the functionality is this:
Generate random number between 1 and 2 (in JS we would use 0 and 1, so whichever works for C++)
If randomNumber === 1 initialise drawLine function, else initialise drawArc function.
drawLine and drawArc also need to contain a randomised number parameter (so generate a random number from 1 - 100, for example, and activate the motor for that length/duration).
The randomNumber function should loop continually.
Hopefully the Javascript function shows this clearly. You can find this here: http://jsfiddle.net/lharby/db6oyz1w/
but I will also try and attach files (I ad to convert the js file txt). Note that if you visit http://apps.mirobot.io/javascript/ you can cut and paste the js code and see it working.
I have tried to write the C++ code myself but I am finding it a minefield and very different. I did start a post on here which did not go very well: https://forum.arduino.cc/index.php?topic=639264.0
I don't need to understand exactly the paradigm, but I need to be able to modify parameters in the function so I can alter the way the robot behaves. So commented code would be great.
I would like to be able to test the code on my Arduino by 18.10.19
I'm sorry I don't have a huge budget, based on how long it took me to the write the JS and hopefully converting it, I am hoping someone will be happy to take this on.
Any questions please do not hesitate to give me a shout.
I am a fairly competent JavaScript developer and have a function working to control a robot vehicle.
I need the code or functionality converting to C++ to upload to an Arduino robot.
The premise of the functionality is this:
Generate random number between 1 and 2 (in JS we would use 0 and 1, so whichever works for C++)
If randomNumber === 1 initialise drawLine function, else initialise drawArc function.
drawLine and drawArc also need to contain a randomised number parameter (so generate a random number from 1 - 100, for example, and activate the motor for that length/duration).
The randomNumber function should loop continually.
Hopefully the Javascript function shows this clearly. You can find this here: http://jsfiddle.net/lharby/db6oyz1w/
but I will also try and attach files (I ad to convert the js file txt). Note that if you visit http://apps.mirobot.io/javascript/ you can cut and paste the js code and see it working.
I have tried to write the C++ code myself but I am finding it a minefield and very different. I did start a post on here which did not go very well: https://forum.arduino.cc/index.php?topic=639264.0
I don't need to understand exactly the paradigm, but I need to be able to modify parameters in the function so I can alter the way the robot behaves. So commented code would be great.
I would like to be able to test the code on my Arduino by 18.10.19
I'm sorry I don't have a huge budget, based on how long it took me to the write the JS and hopefully converting it, I am hoping someone will be happy to take this on.
Any questions please do not hesitate to give me a shout.
Duke H.
100% (2)Projects Completed
2
Freelancers worked with
2
Projects awarded
50%
Last project
8 Mar 2021
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies