Go Down

Topic: Which Arduino or Microcontroller to Make a Robot?  (Read 1 time) previous topic - next topic

aarg

Just be aware that many libraries won't work on an ESP for mostly silly reasons like that the F() macro won't work (or that was my experience anyway). It is also a PITA to operate an ESP via AT commands. But the same could be said of any peripheral that you attempt to use without any support library. I did find one, but I can't vouch for its quality yet.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

PieterP

Agreed.
There are indeed some libraries that don't support the ESP8266, but it's gotten a lot better recently. Most "common" devices are supported (OLED displays, digital sensors, rotary encoders, those kinds of things ... ) and many Arduino libraries by companies like Adafruit have added ESP8266 support as well.

But you're not likely to need any specialized libraries if you're just using the ESP as a WiFi co-processor.

Writing basic Arduino code, like driving LEDs, reading buttons, switching relays, motors, reading I²C or OneWire sensors is exactly the same as on an Arduino UNO. And if you have an ESP8266 dev board, you can just plug it in and hit upload.

In general, I think that programming the ESP directly is preferred, although there are some scenario's where AT commands are better suited for the job.
My point here is that it's better to get a board that can do both.
The price difference is negligible (I paid $3.30 for a WeMos D1 mini clone, and $2.50 for an ESP-01) and as far as I can see, there are no other factors that make the ESP-01 a better choice for this particular project.

Pieter

aarg

Well, I investigated the AT command option. All but one of the resources I found stopped dead in the tracks, after the point where an access point is found and connected to. Then they change the subject or go silent. There was nothing to help with actually using UTP or TCP. Often, a discussion of those came after a sneaky switch to ESP native mode. So I did actually find a sketch that almost(!) did the SNTP function that I wanted. That was after spending an entire day trying to find the correct AT firmware to reflash after giving up once in frustration and burning sketches direct to the ESP. That was because the new firmware doesn't support the 4M flash on my device. So I had to treasure hunt offsite because Espressif doesn't provide it anymore. Stuff like that turns me off. I massaged the hacky sketch into something that works, but it is blocking code. Not good for the kind of stuff I need to do with my other peripherals.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

randomgirl98

I am hacing trouble understanding what the esp is. I need wifi for the remote controller and connection with the robot at a distance

wvmarle

The EPS8266 is a very capable microprocessor with built-in WiFi, often used as WiFi interface for an Arduino (which in a way is sad as then you use the most capable of the two for the least work). The WiFi part can be used as access point and client, and it has a web server built in as well. The ESP does suffer from a serious lack of proper documentation (and even that may be an understatement).

As said most Arduino libraries work out of the box - I have not yet run into problems here, and am using the F() macro extensively myself, especially for all those html strings I use for building up pages.

Main limitation of the ESP vs Arduino is in number of available pins (11 digital + 1 analog), and precision timing. On the other hand the ESP comes with 1 MB of Flash and runs at 80 MHz.

if you need WiFi and don't need all those pins, it's the perfect choice for microprocessor.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Robin2

I'd be interested to know why you think "the simplest ESP8266" would be easier to use?
I was thinking specifically of the case of someone who is at the stage of asking "which board to use". I am firmly of the view that if a beginner buys an Uno or Mega and downloads the IDE s/he will get a program working with a great deal less trouble than if s/he starts with any ESP8266 only.

And if you are just using an ESP8266 as an add-on module (an alternative to a Bluetooth module, for example) then I don't see any advantage in getting a complex ESP8266 which has primarily been developed for standalone use.

If it is more convenient to use the Wemos D1 dev board as a "module" (rather than using a "bare" ESP8266-01) then I have no argument against that. I had thought, from your Reply #12 that you were recommending it as a standalone alternative to a Mega or Uno.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

randomgirl98

since i got good feedback here ill update you guys i bought  a cheap an arduino clone kit and started coding already when i get the basics down ill start adding the complex stuff and get a genuine arduino mega.

wvmarle

The main difference between the genuine and the clones is the price - and with it the support of the development of the Arduino platform. The heart of all of them, the microprocessor, is the same. Usually the whole schematics and all parts are even identical.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

randomgirl98

After playing with Arduino and making a 4 wheel robot on my own now i am struggling with the Wi-Fi extension. I studied adding the esp 8266 but i think there should easier ways to connect to the Arduino wirelessly. So guys, i need your suggestions. Which are the simpler ways on connecting to the Arduino wirelessly to the PC just to be able to control it with an usb contorler from a PC or maybe transfer data.

Robin2

Which are the simpler ways on connecting to the Arduino wirelessly to the PC just to be able to control it with an usb contorler from a PC or maybe transfer data.
PC's normally have Bluetooth and WiFi. Of the two Bluetooth is much simpler - it is simply serial-by-wireless.

On the other hand if you want to make a hand-controller that is independent of a PC I would suggest using nRF24L01+ wireless modules. They are cheap and work well. have a look at this Simple nRF24L01+ Tutorial if you are interested in that option.

I believe you can get adapters that allow an nRF24 to connect directly to a PC but I have never used one.

My system (for controlling model trains) is to connect an Arduino to my PC with the USB cable and use nRF24s between that Arduino and the nRF24s in the trains.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PieterP

After playing with Arduino and making a 4 wheel robot on my own now i am struggling with the Wi-Fi extension. I studied adding the esp 8266 but i think there should easier ways to connect to the Arduino wirelessly.
What are you struggling with exactly?

randomgirl98

What are you struggling with exactly?
I need a simpler module to connect my robot directly to my laptop or router via wifi band. I am trying to do all the data receiving and sending via wifi. After that maybe control it with a game controller connected to the pc.

wvmarle

ESP8266 or if you need more I/O or processing power, ESP32.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

saildude

Some advice based on my experience - get an into text - Sparkfun has a free download and should be info here also.  Real time programming is different than on a PC or main frame - I have an industrial programming background (real time control using PLC's and ladder logic) among other things and have had a bit of a learning curve which has been painful at times.

Learn hot to blink lights and such before you go for the robot arm or other parts of it.

Good luck

PieterP

What do you want to run on the computer side? Do you have a readymade application, or are you programming it yourself? If so, in what language? What protocol and library are you using for the WiFi connection?

You aren't going to find an easier WiFi solution than the ESP8266, I'm afraid.

If you're familiar with Python, you can write both the ESP8266 code and the PC application in Python.

If you want to write a GUI for controlling the robot, I'd recommend HTML + JavaScript in a web browser. Building a user interface in HTML is a piece of cake, and JavaScript has excellent support for manipulating HTML and for WebSockets.
IMHO, the WebSocket protocol is just as easy (if not easier) as Bluetooth.

Added bonus: you don't need to install any special software for running your application.

Pieter

Go Up