▲ 333 r/ComputerCraft+1 crossposts

I made a program that automatically turns solar panels from Power Grid towards the sun

In theory this should work even if you unload the chunk, as I save the difference between the panel angle and swivel angle, but there is a CLI tool to correct the error if anything goes wrong. It is not perfect, but I have wattage approximate to the peak through the day.

The panels only turn from -90 to 90 degrees, at 6:00 to 18:00 ingame. The setup uses a speed controller and a 1/20 gear ratio. The swivel bearing is used for error correction, as the solar panel bearing doesn't have the angle information on it.

You can in theory attach as many panels as you want, but I haven't really tested what happens if only one chunk is unloaded.

Pastebin for ComputerCraft: https://pastebin.com/1h5jtqSL

u/Bright-Historian-216 — 3 days ago

writing code for a new project and ended up writing this long comment; do you think it's good to have comments explaining the entire thought process or is it too verbose?

https://preview.redd.it/20hf84l7rsjh1.png?width=933&format=png&auto=webp&s=ce1a62929d67d3b39bea106d1622a5a658c70ddc

do you think comments should be concise about what exactly the function does and not how it does it, or is it good to have in-depth explanations like this?

reddit.com
u/Bright-Historian-216 — 4 days ago

what is the best jailbreak to get? (11.02)

I'm not familiar with jailbreaking scene, I just have an old console and I heard that jailbroken ones have great second hand value. I have version 11.02 so the webkit should work; the tutorial showed goldhen i think it was called? is this one the best to get, or is there something better?

reddit.com
u/Bright-Historian-216 — 6 days ago

What do I use Crafts and Additions for?

Everyone seems to have it, but it doesn't add much use for electricity. Liquid fuels are extremely useful, but that's just a small part of the addon.

reddit.com
u/Bright-Historian-216 — 1 month ago

limitless supply not actually limitless?

filled a 10000 block hole in the overworld with lava. the hose pulley said "infinite". i immediately reroute all my lava supply to drain from my limitless hole, and immediately it is no longer limitless. did i do something wrong?

reddit.com
u/Bright-Historian-216 — 1 month ago

Dialectal pronunciation of "celsius"

The dictionary states that "celsius" is pronounced as /ˈsɛlsiəs/, which is what I usually hear from most people. However, I've heard a nuclear engineer from the US pronounce it as /ˈsɛlʃɘs/. How common is this pronunciation, and what regional variations may use it?

reddit.com
u/Bright-Historian-216 — 1 month ago

FINALLY figured out how to build a plane (i just can't pilot it well yet!..)

i still can't stick a landing... technically two humans survived my plane landing, it was internal bleeding that killed them, not my plane! they died on solid land!

u/Bright-Historian-216 — 1 month ago

i HATE HATE HATE that UI designers have to ruin the UI every few months just to keep their job

why the FUCK does the same motion i did for so long now do something COMPLETELY different

i can't reach for ANY buttons now and all the sliding directions are completely messed up

reddit.com
u/Bright-Historian-216 — 1 month ago
▲ 3 r/typst

Is there any way to add some basic animations to the HTML output?

It doesn't have to be anything difficult, just some basic sliding when elements come into view. If there is already a package that can do this, please tell me, and if not, is there any tutorial on how to make my own packages for the HTML compiler?

reddit.com
u/Bright-Historian-216 — 1 month ago

my first plane, with a few questions

my obs got corrupted and it's too late now so those screenshots are all i have.

  1. my plane keeps tilting even though the centre of mass is perfectly in the middle. could anything else be causing it? i swear it wasn't tilting before and i didn't change much.
  2. swivel bearings seem very buggy. half the time they just desync after assembling the contraption and it is impossible to fly. sometimes when i disassemble the swivel itself it just goes sideways and erases half my plane! is there any way to fix it?
  3. how do i make a non-computerised control system? currently i have joystick up and down analog signals fed into the computer which processes them into a single analog signal that is sent to servos. the issue is, i need the computer here because 0-7 make the plane go up and 8-15 make it go down. i can't just have each signal independent. sorry if the wording on this one is weird i cannot phrase it normally.

yes this thing sucks i have not watched a single tutorial. please help, kind strangers.

u/Bright-Historian-216 — 1 month ago
▲ 13 r/lua

Is there a way to make a file work as both standalone script and a library?

In python there is if __name__ == "__main__" but I'm not sure there is an equivalent in Lua. I've figured out something like checking the args table but this may or may not be platform-dependent and doesn't work in all cases.

reddit.com
u/Bright-Historian-216 — 2 months ago

finally decided to learn ten finger typing after typing with two fingers my whole life (despite studying computer science/programming around the same amount of time). wow some keys are just so uncomfortable.

"a" requires the weakest finger of my nondextrous hand, enter and backspace require me to lift my hand to press. probably would be much easier if someone bothered to teach me before. and using shift is also uncomfortable. i've been practicing for about an hour right now and my pinky fingers are incredibly sore. they did more work than ever in their lives. hopefully i'll get used to it soon, because for now it's only half my normal speed (and way, way lower accuracy)

reddit.com
u/Bright-Historian-216 — 2 months ago

Is there a mod that is somewhat of a mix between worldedit/axiom and schematica?

What I'm thinking of is a mod that would allow me to create a construction plan in real time in survival which I can then build, also in survival. Is there any like this?

reddit.com
u/Bright-Historian-216 — 2 months ago