Arduino

!arduino

@lemmy.ml
Create post
Newb when it comes to these subjects but really want to learn the hardware side of things - Help with old repository for EDTracker

Newb when it comes to these subjects but really want to learn the hardware side of things - Help with old repository for EDTracker

Hello guys! While I am a relatively experienced programmer, I have practically zero experience on the hardware/electronics side of things. I really want and need (I'd like to work in embedded systems) to get this stuff in my "tool belt" of skills, but I am really worried that I will do something wrong or order the wrong parts because it is quite an old project I will be trying to build.

I would like to make this project (EDTracker github) so that i can play all my sim games that benefit from head tracking again. I had one which was pre-built but the connector broke. I would prefer a version with the magnetometer (9150 or 9250). The problem is that due to my inexperience I have no idea where to search for cheap(ish) components, or even if the components listed in the docs are still available or if there are better ones that do the same thing.

I realise this is not much (almost nothing) to go on, but I would really appreciate any help at all that can push me in the right direction. Also, please be understanding of my possibly ignorant questions. When you have no knowledge in a field it is often hard to know what the right questions are :)

Many thanks in advance!

Edit: Spelling

First compile works, second time fails

First compile works, second time fails

I have recently started working on my school project which involves writing some c++ for the ESP32. At school everything works fine, but at home only the first time I compile and upload the project (using the Arduino IDE), does it actually work correctly. So the communication is there, it just seems that the first compilation step does something to the program, as every time after that first compilation it refuses to compile. Here are the console outputs of the two compilations:

::: spoiler First compilation (successful) [___](WARNUNG: Kategorie '' in der Bibliothek ESP Insights ist ungültig und wird auf 'Uncategorized' festgelegt WARNUNG: Kategorie '' in der Bibliothek ESP RainMaker ist ungültig und wird auf 'Uncategorized' festgelegt WARNUNG: Kategorie '' in der Bibliothek WiFiProv ist ungültig und wird auf 'Uncategorized' festgelegt Der Sketch verwendet 295301 Bytes (22%) des Programmspeicherplatzes. Das Maximum sind 1310720 Bytes. Globale Variablen verwenden 26792 Bytes (8%) des dynamischen Speichers, 300888 Bytes für lokale Variablen verbleiben. Das Maximum sind 327680 Bytes. esptool.py v4.5.1 Serial port /dev/ttyUSB0 Connecting...... Chip is ESP32-D0WDQ6 (revision v1.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 24:0a:c4:58:2a:9c Uploading stub... Running stub... Stub running... Changing baud rate to 921600 Changed. Configuring flash size... Flash will be erased from 0x00001000 to 0x00005fff... Flash will be erased from 0x00008000 to 0x00008fff... Flash will be erased from 0x0000e000 to 0x0000ffff... Flash will be erased from 0x00010000 to 0x00058fff... Compressed 18992 bytes to 13112... Writing at 0x00001000... (100 %) Wrote 18992 bytes (13112 compressed) at 0x00001000 in 0.5 seconds (effective 291.1 kbit/s)... Hash of data verified. Compressed 3072 bytes to 146... Writing at 0x00008000... (100 %) Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (effective 336.8 kbit/s)... Hash of data verified. Compressed 8192 bytes to 47... Writing at 0x0000e000... (100 %) Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 629.9 kbit/s)... Hash of data verified. Compressed 295664 bytes to 165899... Writing at 0x00010000... (9 %) Writing at 0x0001af40... (18 %) Writing at 0x000242c6... (27 %) Writing at 0x00029aae... (36 %) Writing at 0x0002ef0a... (45 %) Writing at 0x000342da... (54 %) Writing at 0x0003a4b6... (63 %) Writing at 0x000447e9... (72 %) Writing at 0x0004c7f4... (81 %) Writing at 0x00051d5d... (90 %) Writing at 0x000576bd... (100 %) Wrote 295664 bytes (165899 compressed) at 0x00010000 in 2.8 seconds (effective 856.4 kbit/s)... Hash of data verified.

Leaving... Hard resetting via RTS pin...) :::

::: spoiler Second time (fail) WARNUNG: Kategorie '' in der Bibliothek ESP Insights ist ungültig und wird auf 'Uncategorized' festgelegt WARNUNG: Kategorie '' in der Bibliothek ESP RainMaker ist ungültig und wird auf 'Uncategorized' festgelegt WARNUNG: Kategorie '' in der Bibliothek WiFiProv ist ungültig und wird auf 'Uncategorized' festgelegt panic: runtime error: index out of range [7] with length 7

goroutine 1 [running]: arduino.cc/builder.(*includeCache).Next(...) arduino.cc/builder/container_find_includes.go:209 arduino.cc/builder.findIncludesUntilDone(0xc000046c00, 0xc0000b0000, {{0x538340, 0xc0006994a0}, {0xc00019604e, 0x7}}) arduino.cc/builder/container_find_includes.go:321 +0x1190 arduino.cc/builder.(*ContainerFindIncludes).Run(0xc00002e1c0?, 0xc000046c00) arduino.cc/builder/container_find_includes.go:149 +0xbe5 arduino.cc/builder.runCommands(0x38?, {0xc000053c58?, 0x22, 0x415b0b?}, 0x55?) arduino.cc/builder/builder.go:191 +0xda arduino.cc/builder.(*Builder).Run(0x7ffca1319b57?, 0x19?) arduino.cc/builder/builder.go:124 +0x890 arduino.cc/builder.RunBuilder(...) arduino.cc/builder/builder.go:222 main.main() arduino.cc/arduino-builder/main.go:338 +0xa1f arduino-builder gab 2 zurück Fehler beim Kompilieren für das Board ESP32 Dev Module. :::

As you can tell, these error messages are not English, they are actually German. In the second compile step, they essentially say the following:

arduino-builder returned 2
Error during compilation of the Board ESP32 Dev Module

I am using Debian 12 (GNU/Linux) on my machine, but I don't think that this would be the issue, as I am clearly able to upload the project the first time around.

Has someone here experienced something like this before? I have looked online, and most sources say that the error code was one and not two, so this seems like a different issue.

Aimbot in AimLab Using Arduino Leonardo

Aimbot in AimLab Using Arduino Leonardo

Open link in next tab

https://www.slyautomation.com/blog/arduino-ide-aimbot-in-aimlab-using-arduino-leonardo/

Monkey Squirter ESP8266 project in action - keeping vervets away from the garbage bins.

Monkey Squirter ESP8266 project in action - keeping vervets away from the garbage bins.

Open link in next tab

tomjuggler on Instagram: "Monkeys don't know what's going on! The portable monkey squirter doing it's job, keeping vervets away from the garbage bins. See circusscientist.com for this and more fun projects."

https://www.instagram.com/p/C4YjtFgNLhw/

1 likes, 1 comments - circusscientist on March 11, 2024: "Monkeys don't know what's going on! The portable monkey squirter doing it's job, keeping vervets ..."

tomjuggler on Instagram: "Monkeys don't know what's going on! The portable monkey squirter doing it's job, keeping vervets away from the garbage bins. See circusscientist.com for this and more fun projects."
Simultaneous joystick 3-axis protocol

Simultaneous joystick 3-axis protocol

cross-posted from: https://lemmy.world/post/10852531

Working on a joystick. Seems like any protocol I use to read from peripherals is going to be bottlenecked by having just one input. My microcontroller might have multiple ADCs, but there's just one processor stepping through them. Same for spi, or i2c, or uart. There's really only ever one sensor reporting back its data at a time.

I know this might not matter for measurement resolution. Especially if you're polling at like 115k serial or something, but...

That's 8 bits per axis, and three axis. Now that's at least 34 bits. To sample each axis we're down to only 4.5k samples per second. Plus whatever other cycles the controller has to handle... even if I spent half that time doing microcontrolle cycles at like 2k we're probably still well with the best star craft apms or whatever. I'd still like to find some way to really over engineer this thing.

I read a little about tdm, but that's out of my league and I don't know if you could even have 3 simultaneously signals that way

I'm thinking a microcontroller for each axis, and a usb port for each of them. So it appears like 3 different controllers to the computer. The user would just have to map the axis from the 3 controllers into 1 in their game software. I assume the steam remapping could do this.

Is it just going to get smashed back into one thread in the computer's usb hub anyway?

Any other suggestions?

Anyone knows if the Uno rev 4 supports HID / the keyboard library to emulate keyboard presses?

Anyone knows if the Uno rev 4 supports HID / the keyboard library to emulate keyboard presses?

I have previously used Arduino Leonardo as it supports the keyboard.h library that enables HID keyboard presses. The latest update of the library is from May 5, 2022. Anyone knows if the Uno rev 4 supports the keyboard library?

WYSIWYG Program for Arduino

WYSIWYG Program for Arduino

Hey all,

I've been sitting on a starter kit for a Mega 2560 R3 board and sensors for over a year. I want to get into it, so bad, but I frankly don't have the time to learn to code this with my job the way it is.

Is there a WYSIWYG program anyone favors, especially for someone new to Linux (I'm using a Raspberry Pi 3 Model B running Raspbian and I have a Raspberry Pi 4 Model B too) and Arduino (board model Mega 2560 R3)?

I found these options. Anyone have experience with them?

Visuino

Embrio

Need help with NodeMCU ESP8266 V3 wemos. Having issues with WIFI + DO (solved)

Need help with NodeMCU ESP8266 V3 wemos. Having issues with WIFI + DO (solved)

(me again) i’m trying to use both WIFI-AP, DO and SPI. But my wifi is not properly working when i let everything run at maximum (required) speed.

TLDR; Seems that pins D1 and D2 interfere with WIFI, but why?

i have a NodeMCU ESP8266 V3 ‘wemos’ variant. (it doesn’t have the ESP-12E board integrated) https://makerselectronics.com/product/wemos-nodemcu-v3-esp8266-340g-wifi-module-with-extra-memory-32m-flash

in setup() i have

  WiFi.softAP(ssid, password);

  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);

  server.on("/", handleRoot);
  server.on("/set_config", handleForm);
  server.onNotFound(handleNotFound);
  server.begin();
  ..
  t=D1;pinMode(t, OUTPUT); digitalWrite(t, LOW);
  t=D2;pinMode(t, OUTPUT); digitalWrite(t, LOW);
  t=D3;pinMode(t, OUTPUT); digitalWrite(t, LOW);

What i'm seeing;

if i have a main loop() with only

  • while (Serial.available()){ .. }
  • server.handleClient();

Then i can see the AccessPoint and i can connect to it with my Android phone.

When i add code running once every 100 msec

  • Debug setting set to MAX debug info to Serial
  • using pins D1,D2,D3 for output (to LED screen)
  • using D5,D7 for SPI, (to LED screen)
  • having SPISettings(15000000, MSBFIRST, SPI_MODE0)
  • taking total 60 up to 74 microseconds

Then i do see the WIFI AP, and i CAN connect with the WIFI AccessPoint. (But my LED display is flickering)

When i change the code to running once every 10 msec

  • // same as before

Then i CAN connect with the WIFI AccessPoint (But my LED display is flickering)

When i change the code to running once every 10 msec

  • Debug setting off
  • using pins D1,D2,D3 for output
  • using D5,D7 for SPI
  • taking total 60 up to 74 microseconds

Then i CAN connect with the WIFI AccessPoint (But my LED display is flickering)

When i change the code to running once every 1 msec

  • Debug setting None + Debug to serial
  • using pins D1,D2,D3 for output
  • using D5,D7 for SPI
  • taking total 60 up to 74 microseconds

Then i do see the WIFI AP, but i CAN'T connect with the WIFI AccessPoint (But my LED display is showing a steady picture)

When i change the code to running once every 1 msec

  • Debug setting None + Debug disabled
  • using pins D1,D2,D3 for output
  • NOT using D5,D7 for SPI
  • taking total 30 up to 40 microseconds

Then i do NOT see the WIFI AP?!

When i change the code to running once every 1 msec

  • Debug setting None + Debug disabled
  • NOT using pins D1,D2,D3 for output
  • using D5,D7 for SPI
  • taking total 50 up to 70 microseconds

Then i CAN connect with the WIFI AccessPoint?!

Seems one of the pins D1,D2,D3 is interfering with WIFI..

instead of using D1,D2,D3, i changed all I/O to only use D1. Then the WIFI AP does not show up in the WIFI networks.

instead of using D1,D2,D3, i changed all I/O to only use D2. Then the WIFI AP does not show up in the WIFI networks.

instead of using D1,D2,D3, i changed all I/O to only use D3. Then the WIFI AP does show up in the WIFI networks. And i can connect to it.

So my question is; Seems that pins D1 and D2 interfere with WIFI, but why?

I turned this touchscreen RP2040 into a touchpad.

I turned this touchscreen RP2040 into a touchpad.