New answers tagged

0

You can assign the pointer to NULL, and in the setup function give it a value. Note you have to add () for the arguments, even if there are none like in this case. Also you have to include the library (but probably you did but not added in your question). #include "Adafruit_NeoPixel.h" Adafruit_NeoPixel* pixels = NULL; void setup() { pixels = new ...


2

int sensor = 900; //variabel sensor void setup() { Serial.begin(9600); while (!Serial); randomSeed(analogRead(A0)); } int number() { int a = random(0, 10); //range pengurang nilai sensor int d = random(500, 1500); //range delay perubahan nilai if (sensor < 670) { sensor = 900; } sensor -= a; delay(d); ...


0

After tinkering around for hours I have finally found a great way to fill triangles! Here we go: for(int x = x1; x<=x2; x++) { for(int y = y1; y<=y2; y++) { lcd.drawLine(x3, y3, x, y); } } Great!


0

simply, using strcpy, and using a char with a given length, works RTC_DATA_ATTR char ssid["dedicated length"]; strcpy(ssid, cSsid->getValue().c_str(), "dedicated length");


1

Currently you are shifting in the button states and directly shifting them out again to the LEDs. Thus the state of the LEDs follows exactly the state of the buttons. As jsotola explained in the comments, you need to seperate what you get as input (buttons and serial) from what you set as output. For this you need 1 or more variables to hold the state of ...


1

Which are the minimum connections I have to make between Arduino UNO and the LCD screen. The TFT screen plugs right on top of your Arduino Uno. I have a "cheaper" model with the same size screen and identical pins as your screen (exact same text printed beside the pins). Before you plug it in, I have a few pieces of advise. It's possible to install the ...


5

Using #include <Arduino.h> in your myheader.h will also include <stdint.h> and probably solve this. The Arduino IDE automatically includes Arduino.h in the sketch itself, but apparently not for external stuff.


Top 50 recent answers are included