8

As Michael says there is a lot more going on than you think. Firstly there are interrupts triggering which can slow things down (used to calculate milllis()). Secondly you vastly under estimate the number of instructions that are being called. For a start the loop is being called from a for(;;) loop in main(): for (;;) { loop(); 4 572: ...


2

Is it possible to program chips like the Arduino uno's Atmega328P directly with USB serial from your computer? The bare chip? Generally, no. Some chips that include USB hardware also may include a DFU bootloader in ROM. If your chosen chip has this, then yes you can - you just need to wire it up and use a suitable DFU firmware upload program to install ...


1

It sounds like you need to watch both encoder outputs and don't let one get ahead of the other. Naturally, they won't sync exactly (i.e., pulse simultaneously) but you can set a limit on how many counts to let them differ by, before pausing the faster actuator while the slower one catches up. If you need to save positions across a power failure, you'll need ...


1

Many full C libraries have an sys/endian.h header file. This defines a number of macros so you can find out what the endianness of your device is. It also usually defines a number of handy macros that can convert the endianness for you. htobe16(x) htobe32(x) betoh16(x) betoh32(x) These convert Host to Big Endian values and back again. htole16(x) htole32(...


1

Is it possible to program chips like the Arduino uno's Atmega328P directly with USB serial from your computer? Put a bootloader on the chip first, then an offboard USB/Serial adapter can be used for the serial programming. That's basically what a ProMini is - a bootloaded '328P (in SMD form) with a resonator & decoupling caps and a small voltage ...


1

strcat is a function to concatenate strings. It expects a char array as second parameter. You have only a single char newChar to add to your string. size_t l = strlen(inputs[i]); inputs[i][l] = newChar; inputs[i][l + 1] = 0; Note: It would be better to track the length of the inputs then use strlen. strlen iterates over the array until terminating ...


1

Although an old question, i just ran into the excat same issue. The problem is that the pin numeration on the wemos D1 isn't the same as on the arduino. I've followed the liquid crystal arduino tutorial but changed the numeration of the pins to const int rs = 12, en = 13, d4 = 14, d5 = 4, d6 = 5, d7 = 16; Now, at least for me, the display works as it ...


Only top voted, non community-wiki answers of a minimum length are eligible