uint128_t
  • Member for 5 years, 11 months
  • Last seen more than 3 years ago
"'Serial' does not name a type" error
9 votes

Your last two lines are not in any function. This confuses the compiler. You need to move those two statements inside a function. Because those statements refer to RawValue, I'm guessing you want to ...

View answer
Arduino port relocation (PORTD to PORTB)
Accepted answer
8 votes

You cannot set pin states in multiple ports simultaneously, if that's what you're asking. At the instruction set level, setting pin states is a single that writes to an 8-bit register which ...

View answer
Clone vs Counterfeit (Arduino)
Accepted answer
7 votes

This is not gospel, but here is what those terms are generally used to indicate (as I understand it): compatible: a dev board which is compatible with the Arduino IDE/toolchain. The Arduino UNO uses ...

View answer
Iterate an Object Array
Accepted answer
5 votes

You are not creating an array of references, you are creating the array from the objects; they are being copied. You can see that this by moving the line (and adding an equals) Train trains[...

View answer
How can I generate a sinewave with Arduino Uno?
4 votes

There are two parts to this: One is the creation/derivation/storage of the digital representation of a sine wave. The other is the conversion of the digital representation of a sine wave to an analog ...

View answer
why does it use A0 to define analog pin 0 in some case and why use 0 directly?
Accepted answer
4 votes

The answer is in the source code. Keep in mind that for this answer, I'm assuming you have a standard Arduino Uno. For other Arduino platforms the values are different but the situation is the same. ...

View answer
How to access serial terminal through USBASP?
3 votes

From the USBASP documentation: Planned: serial interface to target (e.g. for debugging). ..and further on.. Firmware: The firmware dosn't support USB Suspend Mode. A bidirectional ...

View answer
Controlling arduino over webserver
3 votes

This is incredibly broad: you could use an Arduino Ethernet, which has built in Ethernet, or you could use an ENC28J60 Ethernet module, or any of the many, many WiFi peripherals. Also, consider using ...

View answer
What would be the code for using Arduino UNO to alert by sound or LED when it detects a certain position through GPS?
2 votes

First things first: do you know that a GPS can locate your dog accurately enough in your home? Basically, even with a good GPS receiver, the best accuracy you can expect (using off-the-shelf ...

View answer
Start timer when pins connected
2 votes

Are you familiar with interrupts? The best/most efficient way to do this is with pin interrupts on each input pin (and make sure your switches are wired correctly and debounced). Unfortunately, ...

View answer
Can I design Arduino Mega 2560 circuit without adding ATMega 16?
Accepted answer
1 votes

Yes, you can omit the ATmega16U2 and its accompanying parts. That is, the whole right block of schematic in this sheet. The resulting board will work perfectly fine, it will simply no longer have a ...

View answer
Can I connect a camera to an arduino mini?
1 votes

Not really (at least, not with any appreciable quality). Basically, the bandwidth involved is simply too much for the Arduino's relatively slow 16MHz core speed. You might be able to periodically ...

View answer
Help with getting Sensor Average using Arrays
1 votes

total[i] = total[i] - readings[readIndex]; total is of type int. That is, it is a scalar integer. You cannot index into it, total[i] doesn't make sense. That is why the compiler is complaining.

View answer
Motor control using arduino board
Accepted answer
1 votes

Simplest way to do this is two MOSFETs (one per motor, because you don't need to change direction), and some miscellaneous passives, and a flyback diode for each motor. See this tutorial for wiring ...

View answer
Is a 9v battery appropriate for a piezo and 1 LED?
Accepted answer
1 votes

A couple things to note: Get rid of the PWR LED on the Trinket so it's not always drawing current. Sleep the MCU whenever possible, only waking on interrupts. Converting 9V to 5V with an LDO (in this ...

View answer
How to use the analog comparator to determine when an analog pin has reached a certain voltage?
1 votes

You need a low-pass filter between the PWM output and the comparator input. This will allow you to produce an analog voltage from the PWM output, which can the be used as a reference voltage for the ...

View answer
How do I connect an 8x8 LED RGB matrix to an Uno?
Accepted answer
1 votes

Because you have, unfortunately, decided to buy a product without a datasheet (and the product description can't even decide if it's common anode or common cathode!), you'll have to find a product ...

View answer
Interfacing with desktop computer console software
1 votes

For debugging: Configure the UART on the ATmega to output TTL serial. If you are using the Arduino libraries, then Serial is what you want. Connect the TX pin of the ATmega to the RX of the USB/...

View answer
Sensor/servo shield for Arduino Mega
1 votes

Do you mean something like a sensor shield? They have three pins (Vcc, GND, signal), not four (because servos have three pins), but they are designed for connecting a large number of servos These ...

View answer
How would I use Arduino microcontroller separately?
1 votes

Arduino board is used only when we program microcontroller, right? Not necessarily. The Arduino board is useful not only for programming, but because it provides required peripheral circuitry such as ...

View answer
Can an ATtiny print results to a console?
0 votes

This is writing serial data to digital pin 4. If you have a serial to USB converter attached to pins 3,4 and you have a terminal attached to said serial to USB converter, it will print to that ...

View answer
21 Servo on Mega?
0 votes

The Mega board will not be able to supply that much current, no. If you consult the schematic, you will see that the 5V regulator is rated for a maximum current of 800mA. A computer PSU would be an ...

View answer