Firmata scetch C# Buttons

Good day

are there anybody out there that knows how to edit the Firmata app to covert the pwm sliders to actual buttons instead of sliding the bar, be able to push a button on the app to get the same results, forwards, back, left, right?, I need a very simple window with the 4 buttons in it.
Please help with this!
I will use the old standard Firmate Arduino scetch. :slight_smile:

Thank you,
Riaan Deyzel

Firmata is not an app. It is a library that knows how to communicate, via the serial port, with a specific sketch running on the Arduino.

The library is imported into Processing sketches. If there is a specific Processing sketch that you would like help modify, post it.

Good day

I have created a cutom app with peices of the Arduino <> Firmata <> Visual Basic .NET control panel, i have mannaged to make my own app with two sliders to control my motors, but i do not know how to convert these sliders function into a button press finction. Please see link for more detail.
http://robotcontrol.yolasite.com/privacy-statement.php

Please help me with this.
Thank you & regards
Riaan Deyzel

What correlation do YOU expect there to be between moving the slider and pressing buttons? If the buttons represent forward and backward as ON or OFF, then the slider isn't an appropriate replacement.

If the forward button can be pressed repeatedly to increase the forward speed, then the slider MIGHT make a suitable substitute. The middle position of the slider would need to be 0, with the upper end representing the maximum number of "up" buttons presses required to make the motor go full speed forward, and the lower end representing the equivalent value for the "down" button.

Good day

My goal is to se the buttons to drive a WI-FI tank with my Arduino, I lready purchased the Pololu High-Power Motor Driver 18v15 Motor driver for this task & I got the motor, The Motor Driver (controller) works with PWM signals, and I would like to be able to control the 2 motors with my 2 Pololu Motor drivers via my arduino forward, back & control the speed (Tank style driving) for example when you hold in the forward button the motor will go full speed, An added bonus will be if someone can make the left motor go forward & the right motor go backwards when the right button is pushed & visa versa.
There are 2 pins on the Motor driver labled PWM & DIR, not sure how this works, see atached drawing.
http://robotcontrol.yolasite.com/build.php

Thank you,
Riaan Deyzel

I've got to admit that I'm confused. You have two motors, two drivers that take PWM inputs, and two sliders on a VB form.

There are no buttons on the VB form. So

for example when you hold in the forward button the motor will go full speed

doesn't make sense.

An added bonus will be if someone can make the left motor go forward & the right motor go backwards when the right button is pushed & visa versa.

Making the left go forward while the right goes backwards, or vice versa is simple. Reacting to a non-existent button is much harder.

There are 2 pins on the Motor driver labled PWM & DIR, not sure how this works

The DIR pin is connected to a digital pin. Set the Arduino pin HIGH to make the motor turn one way or LOW to make it turn the other way. The PWM pin is connected to a PWM pin on the Arduino. analogWrite a value between 0 and 255 to control how fast the motor turns.

Good day

Sorry for the confusion, I do not have a c# app with buttons, only the Slider portion of the Arduino <> Firmata <> Visual Basic .NET control panel that I copied & pasted into my app, and that works, I tested it with an servo. I would like to know if there is somebody out there that has done something similar in the past or someone who feels up to it, to create me an C# app with 4 buttons that will be able to send the correct PWM & DIR signals to the Arduino? Here is an example of how I would like it to look:http://robotcontrol.yolasite.com/robotics-forum.php#bn-forum-1-1-4078249718/6874
I would prefer not to use the Firmata App or protocol, and rather use a custom scetch that will work with my example on the link.
Kind regards,
Riaan Deyzel