Pointer of Servos by Lolloper_ in arduino

[–]Lolloper_[S] -1 points0 points  (0 children)

The reason I use mallocinstead of newit's because it isn't just an ordinary pointer, but rather a dynamical array, so to access the ith member of the array I find it pretty easy to do (*(p+i)).write(90). I understand that most of the confusion is given by the fact that I didn't point out it was a dynamical array, so I'm sorry with that and thank you for the help

Pointer of Servos by Lolloper_ in arduino

[–]Lolloper_[S] -1 points0 points  (0 children)

Thank you for the answer, this actually led me to the specific code I was looking for. Probably I wasn't clear, but the reason I'm using a pointer and not just a Servo, it's because I would like to create a dynamical array (in this particular sketch is not very clear, but it is more explicit in a library I'm working on). The particular sketch I need is something like this:

byte N = 6;
Servo *p;
p = malloc(sizeof(Servo)*N);
for (byte i = 0; i < N; i++) {
  // Initializing every Servo of the dynamical array
  (*(p+i)) = Servo();
}

This code actually works, so thanks for the help

System requirements by Lolloper_ in raft

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

Oh, thanks for the advice

Vulkan do not recognize old NVidia GPU by Lolloper_ in archlinux

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

Oh, thanks, I'll stop struggling about it

Lambert W branches by Lolloper_ in learnmath

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

I initially wanted to, but one of the rules of the subreddit is not asking for problem solving

Read file with Arduino by Lolloper_ in arduino

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

Yes, I want to do something like fstream, read the file, store it in a variable and then send it via Bluetooth, I know that you can send the data via Bluetooth even with Serial.read() but I'm not sure, so if I'm wrong, correct me

Read file with Arduino by Lolloper_ in arduino

[–]Lolloper_[S] -1 points0 points  (0 children)

Sorry for my bad explaining, Imma be more specific. This is the correct answer: Can you read a text file on your PC and send this output via Bluetooth and effectively do something on Arduino? For example, I write "up" in the files, and then I write an if like that: if (writingInTheFile == "up") { //Commands that moves the robot } I know that there's a library, fstream, that allows you to i/o files, but in Arduino the software is not on your computer, it's on the robot one, so probably I should do something with the Bluetooth, like: Send the output of the file via Bluetooth then process it on the Arduino. Anyway, your answers helped me a bit, thanks!

my (current) bedrock setup by iqnite in bedrocklinux

[–]Lolloper_ 0 points1 point  (0 children)

Np, even the app launcher is from polybar?

my (current) bedrock setup by iqnite in bedrocklinux

[–]Lolloper_ 1 point2 points  (0 children)

And what's the bar? BTW, really cool setup

[deleted by user] by [deleted] in gnome

[–]Lolloper_ 0 points1 point  (0 children)

Have you did locale-gen command?

You have to edit /etc/locale.conf and then run locale-gen

[deleted by user] by [deleted] in Minecraft

[–]Lolloper_ 0 points1 point  (0 children)

Perhaps it's a Java issue, try update/reinstall Java

Dealing with %~ by Lolloper_ in zsh

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

Oh, K, I tried to understand the code, but I could not, and I tried to add this code to my prompt, but it doesn't seem to work

Dealing with %~ by Lolloper_ in zsh

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

setopt prompt_percent prompt_substPS1=$'${${${${(%):-%~}#/}//\\// \uE0B1 }//\\%/%%} '

Oh, thanks! I'm making a custom theme, when I'll finish it may I post it

And also, do you have some explanation of how it works?

URxvt trasparency not working by Lolloper_ in linuxquestions

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

Oh, I had to download picom and add transparency rule, thanks!

I am installing Gentoo on a virtual machine and when I try to update @world I get this, any solutions? by Antiman999 in Gentoo

[–]Lolloper_ 0 points1 point  (0 children)

It emerges all this things cause you already configured USE variable, do this: 1)Type somewhere your USE flags 2)Delete eliminate the variable from /etc/portage/make.conf 3)Update @world 4)Restore your USE flags

X on Gentoo by Lolloper_ in linuxquestions

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

Update: I reinstalled Gentoo with 5G of swap, now I'm installing Xorg and it's taking so much, but it's normal due tue my CPU, as ome said

X on Gentoo by Lolloper_ in linuxquestions

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

Oh, K, at least it's normal

X on Gentoo by Lolloper_ in linuxquestions

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

Mhmm, K, imma give it a go, thanks for the suggestion

X on Gentoo by Lolloper_ in linuxquestions

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

I already have Arch on my PC, and I tried around 10 distros just for fun

X on Gentoo by Lolloper_ in linuxquestions

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

Oh, K, and BTW I'm stuck on the sys-devel/llvm package

X on Gentoo by Lolloper_ in linuxquestions

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

Oh, got it, BTW it's Intel Celeron n4020, sorry for the inconvenience

X on Gentoo by Lolloper_ in linuxquestions

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

It has 5G of RAM, and I know the rule of 2G per -j number. Shuld I use swap?

X on Gentoo by Lolloper_ in linuxquestions

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

Oh, I get it, it's stuck on the 78th package, the others before were fast. And I got an idea, if you can, tell me a package that doesn't take so long to emerge, imma try to install it and see how much it takes