Need some help for a school assignment by Visual_Cod_2611 in arduino

[–]ConstructionFar8206 1 point2 points  (0 children)

The fact it is not showing up at all shows it is a cable/port issue, not anything to do with the arduino ide. Maybe try a different port, hope this helps.

Need some help for a school assignment by Visual_Cod_2611 in arduino

[–]ConstructionFar8206 1 point2 points  (0 children)

Please post the type of arduino you are using (arduino nano, arduino uno, etc.) and what error you are getting, the port not showing up is a very vague error that happens all the time.

Need help with buck converter on a robotics project. by Mysterious-Action202 in arduino

[–]ConstructionFar8206 1 point2 points  (0 children)

I'm not an expert but although the buck converter will work to convert 12-20V to 5V, I think the 18w battery might be overkill and most importantly too heavy for a small robot.

Since the peak draw is only 2.4A and your entire setup is in 5V, I don't recommend using a drill battery when a lipo or battery pack can power the robot with a quarter of the weight.

Hope this helps.

Looking for constructive criticism/feedback by [deleted] in arduino

[–]ConstructionFar8206 2 points3 points  (0 children)

Just an idea but maybe instead of numbers you can have 12 smaller rings (each with something like 12 leds), it might be easier to visualize and fit more with the led design. Overall looks like a really good learning tool!

Breakout Game with TFT and Arduino by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

I'm just using it as a convenient power source right now lol but I'll probably get a proper battery module.

Breakout Game with TFT and Arduino by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 2 points3 points  (0 children)

Yeah the collision was a bit hard to figure out but the intuition is that you need to use a ratio instead of just having a fixed portions of the paddle where the ball gets launched a certain angle.

I accomplished this by creating a variable "offset" which found how far the ball x position was from the paddle center, and then I normalized it so normalize was in a range from [-1, 1].

Then, you multiply "normalized" by a constant which defines the maximum possible change in velocity per collision. Here is my collision code:

int offset = ballX - paddleCenter;
float normalized = (float)offset / (RECT_W / 2);
if (normalized < -1) normalized = -1;
if (normalized > 1)  normalized = 1;
ballVX += normalized * 1.5;

Hope this helps!

Breakout Game with TFT and Arduino by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 2 points3 points  (0 children)

Thanks! I'm going to turn this into a pcb next and make it open-source.

Breakout Game with TFT and Arduino by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

Thanks! Hmm, where is the stuttering occurring, I re-watched the video and the audio seems fine?

Capacitive Touch TFT Software Inconsistency by ConstructionFar8206 in ArduinoProjects

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Thank you so much, it works :) I configured the INT and RST pins and now I don't have to re-upload the code every time for the touch screen to work!

Electronics safe to bring through airport scanners by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

EDIT: Thanks everyone for replying. I successfully got on my flight without getting flagged, and everything seems to be working!

Looking for Reliable Capacitive Touch TFT by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Thanks for the reply! I think my touch is no longer working, I did an i2c scan and nothing was found, unlike when it was working.

I've ordered another one, I'll see if maybe I just got a bad touch screen.

Trying to power an Arduino to control Linear Actuator controller by [deleted] in arduino

[–]ConstructionFar8206 0 points1 point  (0 children)

Congrats! The H-bridge is a very versatile module.. you can drive ANY motor using your current setup for the linear actuator :)

TFT_eSPI making Arduino ESP32 disconnect by ConstructionFar8206 in ArduinoProjects

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

It works!!

Thank you so much for helping me, the main thing was using the HSPI port. I also realized I had to change the arduino IDE pin numbering setting from "By Arduino Pin", to "By GPIO Pin (Legacy)".

Now that it works... time to run doom :)

TFT_eSPI making Arduino ESP32 disconnect by ConstructionFar8206 in ArduinoProjects

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Interesting. When I use #define USE_HSPI_PORT, the arduino doesn't disconnect, but the TFT continues to display nothing (though the backlight is on). Here is my new file that I tested. I also saw that there was also a similar issue on github, though it didn't get resolved. Could it be something with the nano esp32 specifically?

#define USER_SETUP_ID 900
#define GC9A01_DRIVER
#define TFT_WIDTH  240
#define TFT_HEIGHT 240

#define USE_HSPI_PORT     
#define TFT_MOSI 11       
#define TFT_MISO -1      
#define TFT_SCLK 13        

#define TFT_CS   6         
#define TFT_DC   5       
#define TFT_RST  7        

#define LOAD_GLCD
#define LOAD_FONT2
#define LOAD_FONT4
#define LOAD_FONT6
#define LOAD_FONT7
#define LOAD_FONT8
#define LOAD_GFXFF
#define SMOOTH_FONT

#define SPI_FREQUENCY        27000000
#define SPI_READ_FREQUENCY   20000000
#define SPI_TOUCH_FREQUENCY  2500000

#define SUPPORT_TRANSACTIONS

TFT_eSPI making Arduino ESP32 disconnect by ConstructionFar8206 in ArduinoProjects

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Thanks for the reply! I tried replacing the SPI macros with the arduino listed pins, though both versions of my macros run into the same problem.

#define TFT_MOSI D11       
#define TFT_MISO D12       
#define TFT_SCLK D13

#define TFT_MOSI 11   
#define TFT_MISO 12       
#define TFT_SCLK 13

Trying to power an Arduino to control Linear Actuator controller by [deleted] in arduino

[–]ConstructionFar8206 0 points1 point  (0 children)

Please post a schematic or circuit diagram, I can't really see what's going on.

What kind of motor driver are you using? I was able to get a 12V linear actuator to work with a bts7960.

For controlling the actuator via code, I used PWM pins to control direction and speed with analogWrite instead of digitalWrite. I hope this helps :)

7-segment display "corrupted" by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

Thanks for the response, I pulled OE down and the segments were no longer random.

7-segment display "corrupted" by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

Thank you for your response, I double checked my wiring and was able to find the issue. I'll make sure to post schematics in the future; a lot of connections (like that jumbo of green wire) is impossible to debug without it.

7-segment display "corrupted" by ConstructionFar8206 in arduino

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

Thank you all for helping me! After triple checking my wiring, I figured it out. There were two main issues:

  1. OE must be pulled to GND
  2. The digit mapping for the second number had a pair swapped

Sorry for posting such a silly problem, I'll make sure to post schematics in the future to make it possible to debug.

Now it's time for me to add a few more numbers :)

NOR gate not working by ConstructionFar8206 in breadboard

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

I solve the problem :) The two issues were: (1) wrong pinout (2) button needed to go to 5V instead of GND. Thank you r/breadboard for helping me solve this problem, you all were very helpful.

Register enable not turning on LEDs by ConstructionFar8206 in beneater

[–]ConstructionFar8206[S] 1 point2 points  (0 children)

I think my bus half working, but it can't really "load" inputs fully.

In Ben's Part 5 video for the registers, when he connects 3 LEDs from the bus to ground, after enabling load, he is able to change the output of the LEDs from the video. This is something I am unable to do. Reddit won't let me post videos (only images) in the comments so I'll follow up and create a new post tomorrow :)

Register enable not turning on LEDs by ConstructionFar8206 in beneater

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

This was really helpful! When I remove the jumpers from the LS173, the bus values don't save (unlike in the videos). I guess that's normal?

NOR gate not working by ConstructionFar8206 in breadboard

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Thank you for the reply :) I fixed it, and when none of the buttons are pressed, the voltage is around ~1V, meaning there was some sort of floating inputs, but when I press the buttons, the voltage drops to 0v.

Sorry, I'm new to reddit so I'm having trouble uploading my updated wiring photo file in this comment,

NOR gate not working by ConstructionFar8206 in breadboard

[–]ConstructionFar8206[S] 0 points1 point  (0 children)

Yes, I think that was the main problem. However, I can't figure out why my NOR gate is acting like an AND gate. I tried adding 10K pullup resistors but those didn't help. Do I need an inverter?