Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to experiment with some sensors with my Raspberry Pi 3. For that, I searched for sensors to buy online. During the search some websites says "buy sensors for Arduino" and some says "buy sensors for Raspberry Pi". So. if I buy sensors for Arduino, will they work with Raspberry Pi or not?
'it depends" being the answer.
The short answer is: yes probably it will work on both.
The longer answer is you'll be doing some work arounds. (and each is case dependent).
For example the arduino has analog pins, but AndroidThings boards do not - you would need to use a Analog to Digital converter (like this or any other ADC).
Android Things supports these protocols & interfaces
- I2C
- SPI
- UART
- PWM
- I2S
If the peripheral uses one of these, then yes it will more than likely work an AndroidThings (a raspberry pi).
AT also supports GPIO. However if the sensor only uses GPIO, it is likely to require a fast communication speed (in the range of 10's of nano seconds), but Android Things GPIO is slow (the frequency is in the range of 300± nano seconds) - so you'll probably find these sensors are not supported on AT (a raspberry pi).
If after all that you buy a sensor and it won't work with Android Things - you can still use the sensor with an Arduino board and then control the Arduino Board with a Raspberry Pi as a master (like this).
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 days ago.
Improve this question
I have made a project using an Arduino Mega 2560.
It works only with both the USB and the 12v battery attached.
Included in the project are 3 relays, 1 pump, and 2 servos.
The relays and pump run off of the 12V battery directly (after the power switch).
The servos are 4.8V-6.8V, and I am using a voltage regulator set at 5.5v.
No power is being sent from the Mega board for components.
The only wiring to the Mega is to the Vin at 12v from a CA1270 battery.
During research, it seems that the issue could be a lack of amp delivery, but the battery used is for a kid jeep, so I am sure it has the delivery.
I am using power busses for distribution and grounds, so I am confident of grounds and power supply (especially since it runs with the USB).
What could cause this to happen?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I want to connect my Arduino Nano to PC via USB cable. It is described that it needs USB Mini-B connector. But all Mini-B cables are out of stock and only USB Mini-A are available. Will it work with Mini-A. Because I did not find any differences between those two types in terms of connector shape.
No Mini-A will not work.
Type-A connectors are for upstream connections (PC) and Type-B for downstream peripherals (Arduino)
Mini-A was a thing in early 2000s for USB-OTG applications but dropped out of the standard in 2007.
Also they have a different shape. Otherwise a different name wouldn't make much sense.
I don't know where you live but unless it's the Mount Everest it is rather impossible that you cannot get a A-Mini-B cable. Just pick another vendor.
There is a difference in both the cable types i.e., shape, pins etc. You cannot use type-A cable for your Arduino Nano to connect with your computer. I have a solution I used for some modules to program those, you can use FTDI programmer or Arduino UNO as ISP programmer for other Arduino boards, just you need to make some connections between Arduino UNO and Arduino Nano 6-pin jumper according to the pin configurations, the select exact port No. and use Arduino as ISP programmer in programmer setting in Arduino IDE. Here I suggest you to get connected with the SSLA technical support team for getting better assistance from them.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
What can an Arduino do that a Raspberry Pi can't?
Arduino is a microprocessor, not a computer. It means that Arduino has inputs and outputs that you can connect to different electronic components such as motors, lights, sensors, etc.
Those inputs and outputs are only pins that you can send or receive a certain amount current.
Arduino has a pretty limited memory so you can only store a simple program on it, not a OS. It is mostly used in automation. For example you want to automate a garden so you have sensors to detect the amount of water in the ground and then use this information to enable a motor that will turn the water on. There is a complete API to simplify the coding between the programmer and the device.
For example, you have a function that will control the speed of the motor in rpm so you only have to give the speed as a parameter of that function.
Raspberry pi is a complete computer, so you can plug a screen, mouse, keyboard to it. There is some OS available for it. It is not just only pins as inputs or outputs, but HDMI input or usb port.
So Raspberry pi and Arduino are completely different and have both a different field of interest.
You will not order a Raspberry Pi to automate the temperature of your coffee as you will not use a Arduino to make a OS.
I hope this will help making the difference between the two.
Good luck!
I would say that the functions and capabilities of the Pi Zero and the Arduino boards have started to overlap, as have the prices (although where I live the Pi Zeros are still somewhat more expensive that Arduinos). Perhaps we will see the applications start to overlap, too.
Conventionally, the Pi has been used in situations that demanded, or at least benefited from, running a full operating system, while the Arduino was more for running a single, custom program. I don't think there's been much interest in running code on a Pi that does not run under an OS, but it seems to be possible, up to a point. I'm not whether all the hardware is accessible this way, because some of it requires proprietary drivers, IIRC.
Because the Pi conventionally runs a full Linux kernel and utilities, it's been slower to start up in embedded applications, whereas the Arduinos essentially boot right into application code. The Pis have slightly greater power consumption (quite a bit greater, with the full-size models), and are a bit larger.
I suspect that, if you were planning commercial production, basing something around Arduino-type hardware is more likely to be productive that using a Pi. I have come across Pis being used for commercial products, but not (I think) for mass-market applications. The hardware and programming style of an Arduino is much closer to the kind of thing that you can miniaturize into a consumer product, even though the Arduino itself may be comparatively expensive.
In short, I would expect that for casual, home, and research use, it's increasingly easy to justify using a Pi Zero over any kind of microcontroller; but if I had to prototype a mass-market item, Arduino would still be closer to the final hardware spec.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am a software developer with no prior experience in embedded programming. I have to develop a prototype project:(example) to generate Morse Code pulses which are to be output through a solenoid in the form of vibrations. I found that either Arduino Nano or Micro will do this job. Though I have choosen Uno for the project keeping in view later requiremenst will evolve.
I found Leonardo & Uno two close varianst. I selected Uno based on some research I did. Mainly I learned Leonardo is not good choice for beginners due to some of its problems and/or features. Uno also has more help available too being a seasoned variant.
It will be nice if I can have some opinion about it.
As you and Keshav Saharia said, assuming that the capabilities of Uno and Leonardo both meet your needs, the reason to choose the Uno is because it is older, more mature, and better supported. For example, most of the Arduino posts here and on EE.SE are either based on Uno or are compatible with Uno. Likewise, most of the Arduino guides work out-of-the-box with Uno, but not necessarily with Leonardo; Leonardo is always one of those footnotes: If you have Leonardo, you need to do this other thing instead.
Also, if, at some point, you decide to ditch Arduino and use a bare ATmega chip, ATmega328, the MPU in the Uno is the one you are likely to use, and also the one more people are familiar with. Leonardo uses a different AVR chip, the ATmega32u4, which, like the Leonardo, is not quite as popular (widespread?). These are good reasons to choose the Uno, as far as I am concerned.
On the other hand, if you are hoping to keep the prototype board for yourself, you might want to think about the Leonardo, since it is more powerful: more IO, second hardware serial port, etc.
You already asked this question and it has been answered. Your conclusion that the Arduino Nano or Micro won't do the job is wrong. Any version of Arduino will work, as will any other microcontroller (Basic Stamp, Picaxe, etc.). All you need to do to control a solenoid is to turn a digital pin from LOW to HIGH. You WILL need some external circuitry because of solenoid power requirements but the circuitry is trivial.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I was explaining I2C/SPI serial protocols to my friend when he mentioned there's a way to send data between two devices using one wire with the 4B5B protocol. If this is true, why isn't 4B5B used to, say, send data between arduino and peripheral devices?
The short answer is that 4B5B isn't a protocol you can use while I2C and SPI are.
I2C and SPI qualify as OSI Network level 1 and 2 specifications, covering both physical electrical specifications of connection between devices and how the connected devices use the connection to communicate. 4B5B is merely a bit encoding scheme, covering only how to represent 4 bits of data in 5 bits of signal to ensure that the resulting signal has adequate auto-clocking content. 4B5B is not a "protocol" or a level 1 or level 2 network specification, meaning that if you try to connect two devices "using 4B5B" you will still have far too many unspecified details to be able to actually create a connection over which you can exchange data.
Here's a not so useful answer: I think the main reason why it is not part of the Arduino platform is that it isn't implemented on most of the chips on which Arduino is built:
Arduino Nano and Uno are based on ATmega168/ATmega328. Neither 168 nor 328 have 4B5B nor Dallas 1-wire protocol support.
Arduino Due uses ATSAM3x8e. It likewise lacks support for one-wire protocols
Arduino Lenonardo uses a different AVR-architecture chip, the ATmega32u4, but same story.
In the end, the question probably should be put to Atmel rather than Arduino designers.