Profile cover photo
Profile photo
Sid Bradipao
keep it simple
keep it simple


Note: this is not a pure theoretical question, I would like to physically realize a special clock, so also an approximated answer (due to discrete nature of problem) is ok.

We have a round clock only with only hour needle, and we can set angular position of needle (numbers from 0 to 359, one for each degree).

If we want to implement a standard 12-hour clock, we set starting position, then we wait 60/(360/12) = 2 minutes before moving to next position (+1 degree). We say that we have a constant velocity of 0.5 degree/minute = 0.00833 degree/sec.

Let's imagine we want to implement a clock with a certain starting velocity (0.001 degree/sec) and a constant acceleration (0.0001 degree/sec^2). Starting from position 0°, we wait 2 minutes before moving to position 1°, because we suppose first step is at starting velocity without acceleration, but interval time should decrease for the next movement, in order to have the wanted positive acceleration.

Which is the general law for the Nth step, with N from 1 to 359 (and beyond)?

best authentication on IoT device

I am quite new to Firebase and I cannot understand which is the best authentication method for an IoT device.

I have a Raspberry Pi permanently connected to internet, and I figured out how to run python scripts with crontab and how to POST to a firebase database (REST API).

I would like to use some form of authentication, but I find quite difficult to understand which is best and simple way to do it. Some old examples use the Database Secret, but it seems deprecated now.

Post has shared content
Apple has just invented open source... and maybe patented.
Add a comment...

Did you recently experienced missing hangout notification?

Enabling automatic date and time in Android settings will likely fix it. Don't ask me why, but I enabled it and everything worked again.
Add a comment...

Post has shared content
Why some USB C-A cables are dangerous.
Sticky FAQ about Bad #USB   #TypeC   Legacy cables:

Thanks to +Mike Trieu for the suggestion.

Q : Why is a bad 3A resistor a problem?
A: 3A is bad because all of these cables and adapters are legacy host port adapter cable, meaning the other end of the cable is Type-A plug. The Type-A port and the vast majority of the devices that have Type-A ports were never designed to support 3A charging.

The cable lies to the phone by telling the phone it's attached to a pure 3A charging path, like the C-to-C cable to the OEM 3A charger that ships with the Nexus 6P/5X. The phone will attempt to draw 3A, but that may damage the weaker device you have the Type-A end of the cable plugged into.

Q: If I have a 1A or 2A charger, am I safe?
No, if you have a weaker charger, you are actually at MORE risk because your phone/tablet/laptop may not know to stop at the 1A or 2A limit the charger advertises because of the improper identifier in the cable.

Q: Do C to C cables have the same problem?
No. C to C cables do not have the same problem because they are required to be straight pass through and do not have a pullup built into the cable. If the other end of the cable is Type-C, then as long as you plug into a 3A charger (like the one you get with Nexus phones), you will get fast charging in a safe way.

Q: Can you recommend a Type-A charger? Is <insert some random Type-A charger from Amazon> safe? Is it fast?
I cannot review every charger, but as long as you have a safe compliant cable with a 56kΩ resistor, the phone will limit itself to safe levels of charging for Type-A chargers and hubs.

Whether or not a particular charger works best for your phone in terms of charge speed I cannot say definitively. It really depends on a ton of factors, including the protocols your phone and the charger supports. Phones and charger may be able to support up to 2.4A using various proprietary protocols with a safe cable.

Q: Can you recommend a Type-C fast charger?
I like the Google one. 2 Type-C ports, 22.5W total power.

If you want a SUPER deluxe one, get the Pixel 2's charger. It will support up to 60W charging using USB PD. Fast charge your laptop. :)

Q: How can I test the cable myself?
If you have a Chromebook Pixel :

If you have a Nexus 6P/5X phone :

Or use CheckR:

Q: I want to keep my bad cable. Is that OK?
Be very careful what you plug it into. If you must keep it, tag the cable with a label that says "3A bad cable" or something so that in a few years when you forget about this controversy, you don't grab that cable and damage a charger accidentally.

Q: Where can I find the USB spec to read up on this more?
Add a comment...

Post has attachment
LG Italia presenta Nexus 5x.

Bel telefono, ma ci dovrebbero spiegare cosa hanno in mente con quel prezzo.
Add a comment...

Now G+ app has a sort of splash screen... Nice! ;)
Add a comment...

Post has shared content
Worst face of US capitalism... tech giants should actively fight this kind of behaviour, not cherry-picking small fights.
Add a comment...

Post has attachment

Post has shared content
[Android Design support library => Part 1 - Floating Action Button]

Starting a new tutorial series on Android design support library. Thought about sharing my learning with the community, hope it would be helpful and easy to go!

Here you go for the first part about Floating action button. In this part, I have talked about some of the undocumented attributes and issues like margin issue and shadow issue in Lollipop!

Wait while more posts are being loaded