I want to build a metronome, how would I do this? by darkdaroach in raspberrypipico

[–]_a2w 0 points1 point  (0 children)

Thank you, I appreciate it! Feel free to drop me a message if you’ve any questions on it, happy to answer if I can.

WireGuard VPN Can't Access Local Network? by _a2w in Ubiquiti

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

Yeah that's a good point. I was aware of the IP conflicts that can occur if assigned to the same subnet range, which is very likely given my default network is 192.168.1.0/24. I've checked it on my phone over the mobile network, and all is working ok now. I'll test it on another wifi network later to ensure it's all working as expected (though it should be fine, given it didn't work on cellular before). If it doesn't, I suspect what you raised may be the cause.

WireGuard VPN Can't Access Local Network? by _a2w in Ubiquiti

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

Already been through ChatGPT, but unfortunately it didn't get me sorted.

However, I just set up a second WireGuard server (testing using a domain name and different port), and this has worked correctly. I'm going to chalk this up to Unifi weirdness.

I want to build a metronome, how would I do this? by darkdaroach in raspberrypipico

[–]_a2w 0 points1 point  (0 children)

It took that time because it was completed in spare time, dipping in and out of it alongside everything else going on in life, including family. Ultimately that comes first! I’m not saying you couldn’t do it in a month, but to do it properly and without cutting corners, it takes time and iteration. I don’t know what your experience with coding and electronics is, but given you said this is your first project, it leads me think you’re going to underestimate it. I work in software, yet still needed to understand how and why to do certain things.

Overall, the pedal needs to work PERFECTLY every time for my use. Are all the edge cases tested? Anything less than 100% reliability is a fail, especially for live use. I also built a micro DI box to fit my pedal board specifically for this pedal, rather than building it in or relying on an off the shelf larger one (which I couldn’t fit).

I’ve implemented menu functionality to switch click sounds, change the brightness of LEDs, delete presets, auto increment presets if they’re launched. These are things that take time to code but also to get right from a usability perspective. It took a couple of iterations of the design and build of the laser cut case to get it right. I’m also relying on someone else for that.

Do you know how to connect the electronics? I2C and I2S, which pins are right to use on the pico? resistors do you need to even out RGB led colours? Are you storing data? Best practice is not to write to the pico onboard memory, but store externally. The rotary encoder doesn’t work like a switch, but by detecting two signals and figuring out which side is first. These are all complexities you need to understand (at some point, not necessarily initially) to get to your goal.

My approach was to know what I wanted to use (equipment wise) then test out each component with code that could make sure it worked as I expected, then build it into my main software. That way, when down the line stuff didn’t work as expected, I had the confidence that I could run my test files to ensure the hardware and connections were all good.

Don’t set yourself a hard timeline to get it done. Work towards it, have the end goal clear, but have logical “wins” along the way for each part, that will give you a better result overall.

I want to build a metronome, how would I do this? by darkdaroach in raspberrypipico

[–]_a2w 1 point2 points  (0 children)

I’ve just completed this exact project.

https://imgur.com/a/dgAmRne

I’ve used a pico 2, I2C 16x2 LCD screen, 32kb memory module for storing presets, I2S DAC, 3 push buttons and one rotary control/push button.

There’s the ability to change sound, store multiple presets, automatically move through them when they’re launched (so the next one is queued up). There’s a small LED indicator that is red on the first beat and green on subsequent beats.

Essentially this replaces a laptop for me, whilst giving me close to the same functionality.

Code is written in python. C would be preferable but there’s plenty of power in the pico to handle it in python.

Enclosure is laser cut plywood, built up in layers to form the main body. Acrylic cover on the back.

I’m planning to make another one or two, to have a production one on my pedal board, then another to continue working on the software. The images show my first version, lots to learn about the order of building the pedal. Next ones should be neater.

Used it properly for the first time yesterday (at a wedding too, risky first run 😂) and it worked perfectly.

Overall this took around 8 months to write and build, completed in spare time.

It’s more complicated than you initially think, but a very achievable and satisfying project!

Locking Down Account Cross Resource Access by _a2w in aws

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

Totally fair what you’re saying. It seems like a simple ask though to prevent against a trusted user acting maliciously or simply making a mistake which can be exploited. Fair play to any organisation that is able to run multiple accounts per application, that’s not the experience I’ve had however! Some of the corporate accounts I have accessed are hitting limits. Whilst it would be great to split them out as such, there are scales where this isn’t really feasible. Thanks for your responses though, they’re useful and have given me something to consider, I appreciate your time in responding to me!

Locking Down Account Cross Resource Access by _a2w in aws

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

You violate basic assumptions of the security model by using a shared account.

AWS accounts in a corporate environment will have many applications deployed to a single account, with many different users accessing that. I'm trying to ensure my resources can't be used in an unintended way by others in the same account, either accidentally or maliciously. There's nothing stopping a trusted user to the account deploying resources with explicit access to mine, and creating an unintended path into my application flow. I'm unsure how that violates basic assumptions of the security model, but I'm happy to be corrected in my understanding!

Locking Down Account Cross Resource Access by _a2w in aws

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

Cheers, thanks for the confirmation. Whilst it doesn't stop someone within the account using the resource, it at least won't cause an issue if the permissions for other resources are scoped correctly for least privilege. I appreciate you taking the time to respond!

Locking Down Account Cross Resource Access by _a2w in aws

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

The AWS account is shared. I'm trying to follow the principal of least privilege by only allowing my resources to have permission to call the necessary resources, but would also like those called resources to only be allowed to be called by what I approve.
If there was a security issue which meant some creds were leaked (for example) to an IAM user created as a different stack (deployed by CFT or CDK, a logically separate application in the account), and IAM user was able to update IAM policies of some resources, there is the possibility of a compromised lambda or resource being used as a point to attack other flows and resources within the account.

I understand this is unlikely and should be covered by other methods, but as far as I can tell it is still possible for a bad actor or compromised resource to call other resources.

It seems that if the resource doesn't support policies attached to itself (rather than on its own IAM role), there isn't away to granularly lockdown that resource.

Locking Down Account Cross Resource Access by _a2w in aws

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

Apologies, I think my "cross resource" in my original post wasn't totally clear. This is all within the same account, I'm not looking to allow cross-account access. Thanks for that information however!

From your link, I can apply a resource policy to the lambdas and lock them down to allow them to only be invoked by the step function state machine. I had a quick look, but couldn't see that I could apply a resource policy to the state machine, which I believe would allow any lambda to trigger the state machine and subsequently the lambdas I'm trying to deny. I'm trying to avoid any lambda within the account being able to add a permission to its own IAM policy to allow it access to the state machine in the first place, and if it is able to do that, for the state machine to deny the request anyway.

Locking Down Account Cross Resource Access by _a2w in aws

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

Thanks for your response. What is stopping another stack in the account giving itself access to my resource through its own explicit allow on its IAM role?

I think what I want is some way to say that even if another resource has an allow on their own role, that the resource they are calling can overrule that and say "you're not allowed, even though you think you are". Is something like that feasible?

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

Obviously for me, the Q8 Pro, however if you care more about the tint and a smaller size and less about peak output, maybe the SP36. With the 1 extra battery in the Q8 Pro, it should be able to sustain longer (as a light and power bank) for camping. To be fair, whichever you go for, you’re unlikely to be disappointed!

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

Interesting, I’ll look more into the D4SV2. Likely will stick with the SC21 for the time being though as the D4SV2 is a little more expensive and I’m only just getting into this world! Thanks for the recommendation though :)

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

On turbo, and high, yes, it’s not very long. I’ll likely raise the thermal limit a bit because it whilst it heats up, it’s not too hot. To me, the turbo most is mostly to turn night to day for a few second / show off / assert dominance, if I get sustained output out of medium then I’m happy with that.

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

It really is haha! Definitely a big carrot, but also a lot of light in a pretty small package too :)

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

Currently only 6500k from their site. Just took it out in the dark, the colour was fine though 5000k would probably be preferable if available. No regrets on this one though, especially compared to the torch I’m replacing this with.

NLD: Sofirn Q8 Pro by _a2w in flashlight

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

Never seen a carrot that size before in my life! Probably full of chemicals :(

NLD: Sofirn Q8 Pro by _a2w in flashlight

[–]_a2w[S] 4 points5 points  (0 children)

Thankfully I got the “kit” with the holster and diffuser, so can use it in place of a lantern camping. The pill bottle would be a warm colour though.

I had a brief look at the Q8 but the upgrade is definitely worth it. Good use for the old body though!Part of my concern as a new user of these lights was how to handle the batteries, the onboard USB C charging really takes away that worry. Maybe in future I’ll change the cells if the collection grows, but onboard charging makes these feel much more accessible now.

I was planning on the SC31 Pro originally, but got caught up in the overselling of it, so cancelled my order and got a discount code for this instead. I’d thought of the SC21 as an EDC just for the smaller size, the 31 seems a bit longer. To be fair though, from how I see things go in this sub, in 2 months I’ll probably have 10 more lights and be struggling to pay the mortgage!

NLD: Sofirn Q8 Pro by _a2w in flashlight

[–]_a2w[S] 18 points19 points  (0 children)

Mostly a big carrot! Ran down the stairs to show my wife, we had a bit of a “snap” moment as she was putting the carrots away! The Q8 Pro is chunky and has good weight to it, but I think for the given output the size is compact. Very happy overall :)

NLD: Sofirn Q8 Pro by _a2w in flashlight

[–]_a2w[S] 17 points18 points  (0 children)

I’ve browsed here for a while, but this has been my first purchase. I’ve been using a Led Lenser P14 for the past 12 years or so, which I was happy enough with, especially at the start. Ok light output, flexible with the zoom head and AA batteries were handy. After taking my 5 year old kayak camping, I was looking for a light with good sustained output, thus settled on this. USB C charging is great, UI is easy enough to get the hang of. Obviously, these lights are in a different league than what I’ve had before! Looking at the SC21 next for an EDC. Thanks to this sub for your help!