Most Popular

1500 questions
7
votes
5 answers

Clear existing array when getting new serial command

I'm starting to build my first Arduino project but I'm running into some problems with serial communication. I get serial data from the console and store it in a char array called "data". Then, when I send a new console message to the Arduino, I…
squeck
  • 73
  • 1
  • 1
  • 3
7
votes
4 answers

Detailed analyse of memory usage

When compiling a sketch, after linking, the build outputs a kind of forecast on RAM usage, e.g.: Minimum Memory Usage: 1456 bytes (71% of a 2048 byte maximum) Is it possible to somehow get a breakdown or itemization of these 1456 bytes and details…
jarnbjo
  • 328
  • 3
  • 10
7
votes
4 answers

How to detect Arduino serial port programmatically on different platforms?

I am trying to write a little program that needs to detect Arduino ports automatically. I have tried many methods but haven't found any reliable way. I can see that the Arduino IDE can detect it, by showing /dev/cu.xyz (Arduino Uno) or COM6 (Arduino…
leetom
  • 181
  • 1
  • 4
7
votes
2 answers

Arduino Yun C++ environment? Bridge + Cross-Compiler

I'm creating an XMPP chatbot for the Arduino Yun. However, I'm not too confident in the Python performance on such a low performance device and I'm much more comfortable with C++. Is there a C++ crosscompile environment available, and is there a…
Cilph
  • 71
  • 2
7
votes
2 answers

ESP8266 Programming using ESP-01 to USB converter

I am new to ESP8266. To ease out the task of programming esp8266, I bought this: ESP-01 ESP8266 Programmer CH340G Chip USB WiFi Wireless UART GPIO0 Adapter. Configured Arduino Interface to run AT commands in the serial monitor. I flashed ESP8266…
Arjun Sunil Kumar
  • 209
  • 1
  • 4
  • 12
7
votes
3 answers

I2C 2 way communication between Arduino Uno and Arduino Mega

If I remove the transmission code from slave this works properly but I need to transmit from slave. Here is my master code #include void setup() { Wire.begin(3); Wire.onReceive(receiveEvent); } byte x = 0; void loop() { …
srinivas
  • 83
  • 1
  • 1
  • 4
7
votes
2 answers

SerialGSM for GSM shield without SoftwareSerial

SerialGSM is a library for simplifying GSM shields. This is sample code for sending SMS: #include #include SerialGSM cell(2,3); void setup(){ Serial.begin(9600); cell.begin(9600); cell.Verbose(true); …
user1584421
  • 1,395
  • 3
  • 22
  • 36
7
votes
3 answers

Replacing several pinMode() and digitalWrite() pins with an array

I'd like to 'clean up' some code that involves several pinMode() and digitalWrite() lines by using a single line of an array. I'm very new to both arrays so I'm a bit confused. The following examples are sections from code that controls a 4 digit, 7…
zdub
  • 141
  • 1
  • 2
  • 8
7
votes
7 answers

Arduino 16 MHz with only 3.3V?

Now I have these Arduino Pro Mini from Sparkfun. They are the latest version that I know (yeah, it's the one that have those horrible misaligned pins). Now they are designed around the ATmega328P and have a 16MHz crystal on them. Now, my question…
Dat Ha
  • 2,913
  • 6
  • 23
  • 45
7
votes
2 answers

Why is there a plastic sleeve on my HC-05 bluetooth module

I would like want to know why the bluetooth module has a plastic sleeve covering it? Is it possible to remove it?
Roby Sottini
  • 448
  • 2
  • 9
  • 23
7
votes
3 answers

Write PWM with only 8 bit? (Timer2)

I have a problem with the Servo library. I need to read a PPM signal and create a PWM signal of each channel. The problem is that PPM has a higher resolution than PWM so I want to use the 16 bit Timer1 for reading PPM. However the Servo library…
betion
  • 115
  • 2
  • 6
7
votes
2 answers

Difference between Wire.setClock() method and TWBR method for changing I2C Frequency

I want to change the I2C frequency of my Arduino Mega 2560. I did find two methods. One method is to change the TWBR variable after Wire.begin(). The other one is to use Wire.setClock() after Wire.begin(). Whats the difference between the 2…
William Roy
  • 515
  • 3
  • 10
  • 22
7
votes
3 answers

ATTiny85 I2C LCD

My setup is as follows: Arduino IDE 1.6.11 Arduino Pro Mini as ISP ATTiny85 1602A LCD with I2C board The libraries I use are: TinyWireM (source: https://github.com/adafruit/TinyWireM) LiquidCrystal_I2C (modified for ATTiny) (source:…
Thijs
  • 432
  • 1
  • 6
  • 21
7
votes
5 answers

Is it possible to press a button from Arduino and my computer will get a key event?

My idea seems easy: I connect a button with arduino, then write some code and upload it to arduino. Then I open the notepad(or any other editor) on my computer. When I press the button, there will be a character "A" displayed in the notepad. I have…
Freewind
  • 183
  • 1
  • 1
  • 6
7
votes
4 answers

Watchdog timer stuck in restart loop? (green led flashing)

I am trying to set up a way to reboot arduino on command. The code below should do that but it seems like my arduino just get's stuck in some sort of a loop where I cant upload or get any serial output. The green led (pin 13) flashes very fast. The…
DominicM
  • 597
  • 3
  • 7
  • 13