A sketch is compiled code that is uploaded to an Arduino board.
0
votes
2answers
51 views
How can I use my Arduino sketches on my Raspberry Pi IDE?
I have installed the Arduino IDE 2:1.0.5 on my Raspberry Pi3 under Raspbian and am using a cobbler breakout which provides a nice breadboard. On that breadboard I have installed an Arduino Nano to do ...
1
vote
1answer
36 views
'MeDCMotor' does not name a type error inside mBlock
I was using a 3rd party programming enviroment, mBlock 3.4.5 for making C++ Arduino programmes with a graphical programming language. I was compiling a program and the following eroor came up.
...
0
votes
2answers
42 views
Is there a way to keep a program on the Arduino after uploading new sketches?
I am looking for a way to keep a program on my Arduino Nano 3.0, after uploading new sketches on it. I would like to have a program on it that will control th screen and buttons at it. The user will ...
0
votes
3answers
47 views
What is the best board for setting up an SSH protocol to an Arduino?
I currently have a project using an Arduino R3, set up across the room from my computer. This has become quite annoying, as every time I want to push something to the Arduino I have to get up and move ...
0
votes
2answers
54 views
How to run background music while the code for a game is executed
I have some background music. If I put it at the top of the void loop(), it'll first play the music and then execute the game code afterwards.
How do I have the code run while the background music ...
-2
votes
2answers
22 views
Building a low voltage disconnect w/ timer - need help with the timer
I'm trying to build almost exactly this device:
http://www.reuk.co.uk/wordpress/reuk-shop-low-voltage-disconnects-lvd/buy-reuk-programmable-low-voltage-disconnect-with-display/
It is a low voltage ...
0
votes
1answer
38 views
Typedef Function Pointer Invoking Issue
I'm having an issue trying to use a normal non-member function of my main sketch file as a callback. I can't get the function pointer to invoke from a function other than it was saved. More info ...
1
vote
1answer
53 views
Is there a way to “list” (in BASIC, or “cat” in LINUX) the current sketch loaded in my xxxDUINO? [duplicate]
I was surprised when I couldn't find an old post where someone asked this question. Seems like a natural beginner, uh excuse me, "newbie" question, but then I'm a throw-back to the days when a home ...
0
votes
2answers
60 views
What does the following code in Morse Code Arduino mean?
struct node *root, *currentNode;
root = (struct node*)malloc(sizeof(struct node));
root->value = '\0';
root->next = 0;
currentNode = root;
0
votes
0answers
15 views
Arduino runtime error DYLD_INSERT_LIBRARIES
I'm creating a VERY BASIC Arduino program and am getting an error message:
fatal error: runtime: bsdthread_register error (unset
DYLD_INSERT_LIBRARIES)
runtime stack: runtime.throw(0x1819fc, ...
0
votes
4answers
42 views
Digital Reading from a array without using the exact element
Is it possible to read a digital input from an array without using the exact element? Such as
while(digitalRead(myButtonArray[i]))
digitalWrite(myLEDArray[i], HIGH);
Reading the ...
0
votes
2answers
61 views
Keypad number input and store
i'm stuck with a little problem. I need to create a program that can store a number via keypad (this number will be chosen by the user) and then do something with it. To be more specific i will create ...
3
votes
1answer
58 views
How to execute commands on Arduino (via PC) without touching the current sketch?
I am working on my first Arduino project. It's a Reverse Geocache. Basically, it's a puzzle where a battery-powered Arduino is mounted inside a locked box, and is able to unlock the box if the user ...
1
vote
2answers
38 views
How to insert into table in database after every 5 minutes using Real time clock module
I have RTC module attached to arduino mega,
to calculate time difference of minutes I am getting minute from the RTC module
and checking if passed time is greater than 5 minutes then insert to ...
0
votes
2answers
41 views
What do I do about a compiler error “ variable 'font' must be const”
I am trying to run the test program from Adafruit, with their libraries, for an Arduino controlling a Nokia5110 display and get this error message:
Arduino: 1.5.8 (Linux), Board: "Arduino Pro or Pro ...
1
vote
1answer
76 views
Using MMA8451 accelerometer to count steps
I'm trying to use an Adafruit MMA8451 accelerometer to create a pedometer-type device that counts steps. I'd like to initiate a counter that says "if the x-axis readout is > some threshold, add 1 to ...
1
vote
2answers
97 views
What programming practices should be adopted while coding sketches for Arduino?
What are some of the best programming practices that can be adopted while coding sketches for Arduino, so that it uses the least memory and performance should not suffer from memory outage, and still ...
1
vote
1answer
1k views
“stray '/302' in program error” when compiling
For some weird reason, the following code doesn't compile. I get a "stray '\302' in program" error around volatile unsigned int encoderPos = 0;, and I have no idea what the issue is. I've been trying ...
-1
votes
1answer
98 views
The Arduino Sketch does not save in Arduino folder location
I have just installed Arduino on Mac OS. The Arduino folder is created under Documents. But whenever I save the sketch it gets stored in some ghost location and gives an error, the same name already ...
-1
votes
1answer
403 views
Trying to get my mega 2560 to work for my 3d printer
Trying to pit marlins v2non this board and it gives me an error and I have no idea what to do
Arduino: 1.6.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Sketch ...
2
votes
2answers
131 views
How can the Arduino check if it is connected to a PC and the PC is on?
I have been searching around the Internet to find if there is a way to check whether an Arduino is connected to a PC or not.
For example: if my PC is turned on, the Arduino will listen to any serial ...
0
votes
1answer
46 views
How do I convert a program made on Notepad to my Arduino on Proteus
I had the Arduino IDE but I accidentally deleted it. I have no internet connection, so I could not download it again. I do not currently possess the Arduino hardware itself but I do have Proteus and ...
-1
votes
2answers
42 views
Delay In receiving data when SoftPWMBegin(); is used from SoftPWM.h library
when i use SoftPWMBegin() function in setup there is some delay while receiving data over bluetooth. And if i pressed o and 1 fastly (see in below given code), some time it receives data and sometime ...
0
votes
1answer
71 views
Arduino programming through HC06
My goal is not upload sketch to Arduino Pro mini through bluetooth module HC06. I have made a breadboard version of DTR signal simulator which takes LED status pin as a source. The output from the ...
0
votes
1answer
150 views
Reading an MCP23S17 I/O expander port with the Arduino SPI library
I am trying to read an MCP23S17 I/O expander port B with the Arduino SPI library.
The following example is simple as possible, and I still can not get it to work.
The setup is an MCP23S17 I/O ...
2
votes
1answer
78 views
Strobe Frequency Calculation, how its done?
I'm using the Arduino sketch for LED stroboscope found here: http://mehax.blogspot.co.uk/2011/02/arduino-stroboscope.html.
Also below, I've inserted the loop part where this calculations are made:
...
0
votes
1answer
116 views
How to split a string into substring Arduino
I'm about identify myself stupid, howcome I couldn' t figure out how to split a string into substring using arduino, even after 10 days of searching. The number is fact... So, As Mr.Arduino.cc says: ...
1
vote
3answers
161 views
Why does HC-SR04 return 0s in this sketch
I am building a robot with multiple sensors, abilities etc. Since I had a bug with a HC-SR04 rotated by a servo, I experimented in a different sketch. If the distance is less than 30cm, the servo ...
1
vote
1answer
35 views
HUGE deviation in Sharp IR sensor values if other pins are defined in void setup()
I wrote this code for a project -
int sensorpin = A5;
int val = 0;
double avgval = 0;
int E1 = 11;
int brake = 12;
char data = ' ';
void setup()
{
Serial.begin(115200);
pinMode(E1, ...
0
votes
0answers
80 views
Arduino UNO suddenly stops responding
I wrote this simple script to control a servo over serial comm -
#include <Servo.h>
Servo steeringServo;
char data = ' ';
void setup() {
steeringServo.attach(9);
Serial.begin(115200);
}
...
0
votes
1answer
309 views
how to send large strings (> 100 characters) from arduino serial monitor
I am a newbie to arduino programming. I wish to send big strings which are in range of 100 to 1000 characters to my arduino uno. I saw that arduino cannot read more than 63 characters at a time.
The ...
0
votes
1answer
65 views
Does serial communication between PC and Arduino has to be in a loop?
I am trying to send a few variables from my python script to my Arduino. I am using pySerial. I am able to send the variables to the Arduino, but my Arduino sketch runs only for a second and then ...
0
votes
0answers
43 views
Arduino on a breadboard, single bootloader/uploader circuit possible?
I would like to know if my intuition is correct that two circuits can be tied to the same ATMega, provided they don't use the same pins. I would like to make a single shield with a dip socket which ...
0
votes
1answer
15 views
Sketch not running as expected
I wrote this sketch along with an HC - SR 04 Ultrasonic transducer and a DC motor. Whenever the HC-SR 04 reads any distance less than 15 cm, the motor stops, otherwise it keeps running.
The problem ...
-1
votes
2answers
142 views
Ughh… My Arduino Code ain't workin'… And i just couldn't see any problems… Any thoughts?
There's Latest Update!
So i'm workin' on a counter just for fun. How it works is when you press BUTTON1 the LED Lights up red, the buzzer beeps and the variable "counter" adds one to itself; After ...
0
votes
0answers
147 views
How to Upload Arduino Sketch via bluetooth BLE
I want to upload Arduino hex file through BLE HM-11 from Android phone.
The details of my android board are given below-
I am using a customize Arduino board with 8 Mhz internal clock.I have ...
1
vote
2answers
76 views
Can you pass params to an arduino sketch?
I was wondering if there is a way to pass parameters to an arduino sketch at the upload step.
Edit: The reason this would be helpful is because I have a bunch of esp8266 units that need to have ...
0
votes
0answers
34 views
How to control motors without conflict from joysticks?
I am building an ROV that will control motors with 3 2-axis joysticks. I have four horizontal motors that are vectored in this configuration in order to allow for more axes of motion such as crab and ...
0
votes
1answer
35 views
Using two ultrasonic sensors together
Using two ultrasonic sensors together, how can I enable one before the other?
0
votes
2answers
72 views
Include Git tag (or SVN revision) in Arduino sketch?
Is there any way to get the current Git tag/commit identifier into an Arduino sketch binary?
For normal desktop program development, you can pull some tricks with the Makefile (as pointed out in this ...
0
votes
1answer
138 views
Controlling HC-05 from a sketch
Hi I am making a sketch and circuit with a HC-05 BT receiver to upload sketches via Bluetooth to my Uno. This requires giving AT commands from the sketch. I would like to see the response from the ...
0
votes
1answer
198 views
Arduino OOP and [this] keyword
Lets say I have a sketch called mysketch.ino with these contents:
String globalString = "ThisisGlobal";
void setup(){}
void loop(){}
How can I pass THIS sketch mysketch.ino as an object or its ...
1
vote
0answers
69 views
Running script file/programe on Intel Galileo gen2
How do I run a script file/programs like C / python / shell script in an Arduino IDE like how We use System();
Commands like grep, cut, cat works fine but running System("python file.py"); doesn't.
...
0
votes
3answers
321 views
While loop not breaking
I'm trying to build a circuit that buzzes until a button is pressed, or it buzzes 5 times:
void alarm()
{
int AlarmState = 0; //Just to get while loop going
int count = 1;
while(AlarmState==0)
...
1
vote
1answer
870 views
Upload sketch via Bluetooth using HC-06 module
I'm dealing with an application in which I need to upload sketches remotely to an arduino UNO board. I successufully managed to upload sketches using an HC-06 bluetooth adapter. The only problem is ...
2
votes
2answers
2k views
How to generate true random numbers over Arduino Uno without any external hardware?
Using a 'random' function in sketch gives same pattern of numbers every-time. But, I need to generate different numbers such that any number to repeat itself should have a very less probability.
1
vote
2answers
152 views
Arduino Prototype on Breadboard: “avrdude: stk500_recv(): programmer is not responding”
I have created an arduino prototype using the exact instructions found on this page:
https://www.arduino.cc/en/Main/Standalone
However, when I plug in the micro USB power supply and try to upload a ...
1
vote
1answer
109 views
How to exclude a ino/pde file from Arduino projects
I would like to be able to exclude from the auto-including process of the current project (without renaming the extension or delete it) a sketch with pde or ino extension that is used in certain ...
-2
votes
1answer
1k views
Problem: “stray '#' in program” [closed]
I got a sketch from the internet (http://www.instructables.com/id/How-to-build-an-8x8x8-LED-cube-and-control-it-with/) for controlling the display of an 8x8x8 LED cube. The program won't compile and ...
0
votes
1answer
42 views
Stuck on uploading sketch via USB 6 pin
I'm just got a Galileo Gen2 and wanted to try a simple blinking-led. The firmware have been updated to 1.0.4. My problem is whenever I try to upload the code I get this error:
Sketch uses 83,775 ...