Thu, 16 Nov 2017 05:30:31 GMT
I would like to report an issue I am having problems resolving, which could be maybe helpful to get on with the resolution of this or other similar problems.
I am trying to replicate in GH the basic movement instance as shown in the photo:
(i.e. the robot just moves permanently forwards).
The robot I am using is the one you could see in the picture attached below: (//muut.com/u/firefly/s1/:firefly:iMmG:1508721684371.jpg.jpg) (//muut.com/u/firefly/s1/:firefly:caeL:1508721685123.jpg.jpg) .
The device is a standard Eduino robot (Arduino UNO + shield board + 2 left motors + 2 right motors + proximity sensor and Bluetooth antenna) which we would like to use in a construction management maintenance program, and should be receiving very basic commands based on activating the 2 left and right motors. The 4 engines are coupled by side, which means digitalWrite(RightMotor_1_pin, HIGH) moves the robot forwards activating both Right motors and digitalWrite(LeftMotor_2_pin, HIGH) moves the robot backwards activating both Left motors (tested and working - combinations and rotations are workin g too).
My great problem appears (along with the Read instance reference issue some other users here report, but this is a minor issue) as I try to simulate the code in Firefly for GH. Inputting HIGH, LOW or PWM values for the correct control pins yields no results whatsoever, as the robot appears to receive the commands (LEDs blink) but does not move.
The GH code I am working on is the following (very simple) code:
The code (which is depicted not working because of hardware not attached to the PC) works until the WirteToUno part in blue, which should activate the Right motors and set the rotation speed through PIn 6 & 5 (PWM), as described in the program.
Unfortunately it does not seem to be working, and I am sure it lies most probably in my ignorance of some basic functioning of Firefly. I read through the primer, but I could not find hints for a missing code piece in the documentation. I also avoided to use the Stepper motor firmata for the purpose, as it defines 4 motors (associated to different pins as in the robot) and this would not be the case.
Thanks for any help you could provide!