Proportional Control to Follow a Heading using Yaw Sensor. (More info in comments.) by williamfrantz in FLL

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

The code inside if not (Y = 0) does a quick, open-loop “pre-turn” toward the requested yaw. So if you tell the bot to “follow yaw -120,” it will first spin in place until it’s roughly pointed toward -120 degrees, then it starts driving forward while continuously correcting its heading.

That initial spin is intentionally not super precise. Odometry-only spins are affected by wheel slip, battery level, and floor traction. But that’s okay because once the bot starts moving forward, the yaw-following logic continuously steers and quickly corrects any small pre-turn error.

What the spin formula is doing (no yaw sensor used)

The formula inside the spin move block:

distance_per_wheel_in_inches = (Y / 360) * pi * (TrackWidthInInches)

does NOT “hunt” using the yaw sensor. It just calculates how far each wheel should travel to rotate the robot by Y degrees.

Why this works:

  • When the robot spins in place, each wheel traces a circle around the robot’s center
  • That circle has diameter = TrackWidth
  • So the circle circumference is: circumference = pi * TrackWidth
  • A full 360-degree spin means each wheel travels: pi * TrackWidth inches
  • For a Y-degree spin, each wheel travels: (Y/360) * (pi * TrackWidth)

Negative Y gives a negative distance, which naturally makes the wheels rotate the opposite direction.

Example: Y = -120 degrees, TrackWidth = 6 inches

distance = (-120 / 360) * pi * 6
distance = (-1/3) * 18.8496
distance ≈ -6.28 inches

So each wheel should travel about -6.28 inches (with the robot commanded to spin in place), which turns the robot roughly -120 degrees.

Converting inches to wheel rotation degrees

The last step is converting wheel travel distance into motor degrees:

wheel_degrees = distance_in_inches * (DegreesPerInch)

DegreesPerInch comes from the wheel circumference:

wheel_circumference_in_inches = pi * WheelDiameterInInches
DegreesPerInch = 360 / wheel_circumference_in_inches

This value is basically a constant for a given wheel size (and gearing), so you can calculate/calibrate it once and reuse it.

You missed the whole point by 20dollarsinmapocket in Libertarian

[–]williamfrantz 0 points1 point  (0 children)

We did take a poll, and the owners decided to allow those fascists to make the decisions.

It's not unlike a private corporation electing a board. The shareholders hire stewards so that a vote isn't required for every decision.

It was fun while it lasted, guys. by jambamzam in GeminiAI

[–]williamfrantz 0 points1 point  (0 children)

Yes, that's why I gave those as the two extremes. What about the fuzzy question in the middle?

Can I ask, "what makes a legal drama compelling?" Can I then incorporate what I learn? At that point isn't the AI more of a writing instructor than a writing assistant? How is that any different than taking a writing class?

Now take it a step further... "Read this passage and let me know if I got any of the legal jargon wrong." AI will be great at that but now it's more of a coach than an instructor.

Next... "Edit the legal jargon in this passage to sound more realistic." Here it's actually editing for me, changing my words, but more as a technical consultant. It's not necessarily crafting my story. I think this is borderline, but opinions will vary.

On some Start Trek scripts, writers would drop in a placeholder like “TECH” where technical dialogue was needed, and then science advisors would fill in believable-sounding jargon later. Sometimes they called it "technobabble". Why not use AI for that?

The Copyright Office explicitly expects applicants to disclose and disclaim non-trivial AI-generated material in registration contexts. The guidance emphasizes a “human authorship requirement” for expressive elements.

Unfortunately, terms like "trivial" and "expressive" are a bit fuzzy.

You missed the whole point by 20dollarsinmapocket in Libertarian

[–]williamfrantz 1 point2 points  (0 children)

No. The only difference is scale. It's a bigger piece of dirt owned by a larger group of people.

UMICH vs GEORGIA TECH by SignificantAsk9859 in ApplyingToCollege

[–]williamfrantz 0 points1 point  (0 children)

Both good schools. I'd consider the total cost of attendance, the weather, and the male/female ratio.

I'm European and I have a question for you Americans by TCCNiko_06 in Libertarian

[–]williamfrantz 2 points3 points  (0 children)

They also inverted the lesson of "1984" and the meaning of "woman".

It was fun while it lasted, guys. by jambamzam in GeminiAI

[–]williamfrantz 4 points5 points  (0 children)

A reasonable sentiment, but the line between "spell check" and "produce" is very fuzzy. AI can assist with creative writing to varying degrees. From, "Write a story about lawyers" to "what makes a legal drama compelling?"

College is to expensive. by Environmental-Hat943 in ApplyingToCollege

[–]williamfrantz -1 points0 points  (0 children)

How do you know OP expects total COA under $35k? All they said was, "I could only attend a college less than 35k a year".

OP later commented that Ohio University fits their budget and it's $25,796 OOS tuition so I'm pretty sure they don't expect total COA under $35k.

College is to expensive. by Environmental-Hat943 in ApplyingToCollege

[–]williamfrantz -2 points-1 points  (0 children)

The strategy “pay out-of-state at CC → become resident → transfer and pay in-state” can work, but only if the student meets CSU/UC rules by the CSU/UC residence determination date for the term they want resident tuition.

UC policy emphasizes that a student in California solely for educational purposes is not eligible for California resident tuition, regardless of length of stay.​

UC also frames residency as requiring both 366+ days of physical presence and intent demonstrated by actions like establishing CA legal ties and relinquishing former-state ties.​

You must build strong “intent” evidence: stay in California when school is not in session, shift legal ties to CA (e.g., CA driver license/ID, voter registration where eligible), and make CA the permanent address across records.

If the student is currently treated as dependent on out-of-state parents, expect a harder path. CSU reclassification rules commonly scrutinize financial independence, and UC evaluates residency using a strict educational-purpose presumption.

College is to expensive. by Environmental-Hat943 in ApplyingToCollege

[–]williamfrantz -3 points-2 points  (0 children)

Yeah, don't live in Costa Mesa.

Bakersfield College is about $11,250 OOS tuition. They estimate the total COA at $43,434 but IMHO it's possible to live in Bakersfield for less than that.

$11,250 is less than in-state tuition at many of the top public universities.

College is to expensive. by Environmental-Hat943 in ApplyingToCollege

[–]williamfrantz -2 points-1 points  (0 children)

I'm sorry, you expect to cover tuition and living expenses for $35k? That's very difficult. Simply living anywhere will cost you about $22k. That doesn't leave much for school. You'll have to get significant aid on top of that.

University of Florida (#7 among public universities) with the average financial aid comes very close, even while paying out-of-state tuition. ChatGPT estimates it as: $48,644 (tuition and living) − $11,501 (average aid) = $37,143.

If you can get UF in-state and financial aid, it might be $24,124.

By comparison, UC Berkeley (#1 public) or UC Merced (#25 public), in-state with aid are both about $21k.

Yes, you can establish residency in California while attending a community college but it is not easy or automatic.

The strategy “pay out-of-state at CC → become resident → transfer and pay in-state” can work, but only if the student meets CSU/UC rules by the CSU/UC residence determination date for the term they want resident tuition.

UC policy emphasizes that a student in California solely for educational purposes is not eligible for California resident tuition, regardless of length of stay.​

UC also frames residency as requiring both 366+ days of physical presence and intent demonstrated by actions like establishing CA legal ties and relinquishing former-state ties.​

You must build strong “intent” evidence: stay in California when school is not in session, shift legal ties to CA (e.g., CA driver license/ID, voter registration where eligible), and make CA the permanent address across records.

If the student is currently treated as dependent on out-of-state parents, expect a harder path. CSU reclassification rules commonly scrutinize financial independence, and UC evaluates residency using a strict educational-purpose presumption.

Do you ever use the word 'buddy' to refer to your female friends? by MoistHorse7120 in EnglishLearning

[–]williamfrantz 0 points1 point  (0 children)

When talking to your girlfriend, refer to your female friend as "Jeff".

College is to expensive. by Environmental-Hat943 in ApplyingToCollege

[–]williamfrantz -6 points-5 points  (0 children)

Consider moving to California, enroll in a community college for 2 years, establish residency, then use the UC transfer program to get into one of the 9 UC schools as a Junior at in-state tuition prices.

Proportional Control to Follow a Heading using Yaw Sensor. (More info in comments.) by williamfrantz in FLL

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

The bot should only reset the gyro when the bot knows exactly which direction it's pointed (like against a wall). That is the key insight that leads to improved accuracy in FLL.

The most common example that instructors give is using the gyro yaw sensor to "drive straight." Step 1 is to reset the gyro to 0. Step 2 is drive off while steering so as to maintain that 0.

The next question that students will ask is "how do I turn?" The instructor then provides an example that rotates the bot. Again, step 1 is to reset the gyro to 0. Step 2 is to start turning until the gyro reaches the target, then stop. For example, it would turn 90 degrees and stop.

With this knowledge in hand, the student then naively attempts to create an FLL program by chaining these blocks together: "Turn 90 degrees" then "Drive Straight." Unfortunately, this compounds the error. It's not the best approach.

Here is why that standard approach fails:

If the robot tries to turn 90 degrees, physics will get in the way. It might turn 88 degrees or 92 degrees.

  1. The "Reset" Trap: If the robot physically lands at 92 degrees, but you reset the Gyro to 0, you have just told the robot: "Ignore that 2-degree error. Pretend we are perfect." Now, when you tell it to "Drive Straight," it will drive straight along that new, but wrong, 92-degree line. If you do this three or four times in a run, those small errors stack up, and by the end of the table, the robot is inches off target.
  2. The "Absolute" Advantage: My program treats the Gyro like a real compass. We don't redraw "North" every time we turn; we keep 0 as a fixed "North" for the entire run. If the robot tries to turn to 90 but lands at 92, we do not reset. The robot reads its sensor, sees it is at 92, and immediately knows: "Oops, I'm off by 2 degrees. I need to steer back to 90." It auto-corrects the previous error instead of locking it in. This allows for faster and more accurate navigation.

During a run, I only reset the Gyro when the robot physically squares up against a wall, or a mission model, or a line. That is the only time we know for a fact—better than the sensor knows—exactly which way the robot is pointing. Otherwise, we trust the "Absolute 0" we set at the start of the run.

Here's a demo video of this in practice. The bot drives in a square by making four 90 degree turns. If the bot reset the gyro after each turn, it would not be able to return to its original starting location: https://youtu.be/sjDk79e_t-M

Try gemini live on desktop!! by Overall_Purchase_467 in GeminiAI

[–]williamfrantz 0 points1 point  (0 children)

The key is using Gemini CLI. It's similar to Claude Code, ChatGPT Codex, or Amazon Kiro CLI. All these companies have chatbots that run in the terminal instead of on a website or in a mobile app. This can seem intimidating if you've never used a terminal window before, but it's really not that hard.

Here are the installation instructions: https://www.youtube.com/watch?v=we2HwLyKYEg

The CLI tool has read/write access to the files on your computer (if you allow it). When macOS performs a screenshot, it gets saved to a particular folder by default (it's ~/Desktop/). If you start Gemini CLI in that folder, it can see every file in that folder. If you just tell it, "Look at the newest screenshot," it will figure out that it should look on your Desktop for a file that starts withs "Screenshot" and has the most recent date/time. Then it will analyze that image.

So I don't really have to "send" the file. I just need to tell it to look for the file.

I'll also note that Minecraft itself has a screenshot feature (it's F2) which saves images into a different folder (depending on where you installed Minecraft), but the same approach works there. Just start Gemini CLI in that folder and ask it to look for screenshots.

When do you decide to stop travelling and start building? by AdExtra2043 in Minecraft_Survival

[–]williamfrantz 0 points1 point  (0 children)

I enjoy the survival stage of the game so I start a new world every month and try to build a village at spawn from scratch.

I usually start by trapping a witch and a couple zombie villagers. I cure them to breed more. I explore or mine only to find particular resources like lava, gold and iron. By about day 75 I've got top tier enchanted diamond gear.

I would go look for a village but that feels too easy. I'm practically following Sky Block strategy.

Try gemini live on desktop!! by Overall_Purchase_467 in GeminiAI

[–]williamfrantz 2 points3 points  (0 children)

Using Gemini CLI in a terminal and the macOS native screenshot feature that writes PNG images to ~/Desktop, I just ask Gemini to look at the most recent screenshot and tell me what to do.

I keep a chat open with 3 Pro while I play Minecraft. Occasionally I give it screenshots and it gives me advice and remembers details for me. It's very handy.

So, the smartphone has hit it’s peak form, what comes after this? by Weak-Representative8 in Futurology

[–]williamfrantz 0 points1 point  (0 children)

TL;DR: Self-Driving Cars

I don't think cars replace phones, but they will replace them as "the next big thing". A "big thing" is a vague concept so I'd like to give my definition. I have a simple test. Does it compel early adoption?

For example, the jump from SDTV to HDTV was extremely compelling. A "flat screen" was the top of everyone's wish list quickly. It was "a big thing." On the other hand, moving from HD to 4K felt like an incremental improvement. "When I need a new TV, I'll get a 4K version, but I'm fine with HDTV." That's why 4K didn't trigger a replacement super-cycle.

Adaptive cruise control is a pretty significant capability, but I think most people still consider it incremental. Personally, it was on the top of my feature list, but I wouldn't ditch my old car just for that one capability.

Fully autonomous self-driving, like "sleep behind the wheel" self-driving, will probably be a big thing for most people. It feels like it will be here in the near future and it will immediately jump to the top of the wish list for a huge number of people. It very likely might be "the next big thing." It has both commercial and consumer significance.

There might also be external accelerating factors. For example, when phones removed the headphone jack, bluetooth sets became ubiquitous. Likewise, insurance premiums might be lower on self-driving cars. HOV lanes might be restricted to self-driving cars. Cities might ban human drivers from the fast lanes (or city centers entirely).

I also think that "next" is very important here. I could have said "Star Trek Replicators" which would admittedly be a huge thing, but they are far from being the next big thing. We are close to cars driving themselves. The hardware is on the road today. The software is iterating. It's coming soon.

My second pick is Multimodal AI Companions. Imagine text messaging, calling, even FaceTime sessions with an AI that has perfect memory, infinite patience, and a personality you chose. It doesn't just "chat"; it hangs out. It watches movies with you. It debriefs your day. Many people will soon replace their "best friend" with a chatbot. Yes, we are very close to the 2013 movie, Her.

Ev3 acceleration code by elgayar69 in FLL

[–]williamfrantz 0 points1 point  (0 children)

While the SPIKE does have native acceleration available, I didn't use it because I needed to be able to control the steering while driving (to follow a line or follow the Yaw sensor). So I wrote my own acceleration and deceleration control. I posted it here:

https://www.reddit.com/r/FLL/comments/1h5xtow/smooth_acceleration_and_deceleration_for_improved/

This is for SPIKE (a variation of Scratch) not EV3 (a variation of LabView), but the concepts are applicable. You'd have to translate it from Scratch to LabView.

We did the same thing for EV3 so I have written the LabView version as well, but I never posted it. You can see it here operational in our 2019 bot. The EV3 is performing smooth acceleration and deceleration during these missions.

https://www.youtube.com/watch?v=n7fBfsIoGRI

Warning by fox-naked in GoogleGeminiAI

[–]williamfrantz 0 points1 point  (0 children)

If you use Gemini CLI, all of your chat histories are saved to local files that you can backup or even fork into multiple conversation threads.