Apr 29, 2021 18:29
On the other hand, I absolutely love the advice to "functionalize" the function. It's a UNIX philosophy to write smaller functions that just do one thing only. It's especially evident in procedural languages
Apr 29, 2021 18:29
Also it probably worths pointing out that while I do program with most-recent compilers, I still write small programs compatible with older standards, when it wouldn't cost me much.
Apr 29, 2021 18:29
Alright, let's say it's a matter of taste then. I still think there should be just one way of writing code. It's personally harder for me to read code with odd formatting. And by "odd" I mean different. If brackets are on one level, it's less motion for the eyes
Apr 29, 2021 18:29
And while on the subject, note that in the final result the binary() function proto formatting differs slightly from the other functions. For consistency, I'd declare all functions with spaces in the syntax and call them without.
Apr 29, 2021 18:29
Yep, everything is just so, I only would consider the {} formatting to be a terrible idea in terms of readability :)
 
Mar 27, 2018 12:57
Yes, thank you
Mar 27, 2018 12:52
the speed controller the 94$ motor has actually provides charging board as far as I understood
Mar 27, 2018 12:52
Yes each battery should probably have a termistor
Mar 27, 2018 12:52
and use the Arduino to control it
Mar 27, 2018 12:51
Maybe use the friction of the motors to generate 5V and supply that electronics for the bicycle
Mar 27, 2018 12:50
I will also put my Arduino to some use
Mar 27, 2018 12:50
if I had to
Mar 27, 2018 12:50
would take much time to implement all that
Mar 27, 2018 12:49
and diode and perhaps resistor
Mar 27, 2018 12:49
and a capacitor
Mar 27, 2018 12:49
My country is very expensive so it would be ebay.
I think I can make overvoltage protection with a SCR
Mar 27, 2018 12:47
to make a stable psu
Mar 27, 2018 12:47
Instead of buying all those bcbs, if the BMS isn't very expensive, it is better to just buy one good BMS
Mar 27, 2018 12:46
a diode at the negative side for the reverse polarity protection
Mar 27, 2018 12:46
for the undervoltage
Mar 27, 2018 12:45
I can easily protect batteries from overvoltage using fuses
voltage regulators
Mar 27, 2018 12:44
I hope it is not very expensive
Mar 27, 2018 12:42
So there could be more economic riding
Mar 27, 2018 12:42
And the motor also have speed controller and throttle
Mar 27, 2018 12:41
which is not bad for 100$
Mar 27, 2018 12:41
or so
Mar 27, 2018 12:41
For 14 lg batteries I think I can move the bicycle for an hour
Mar 27, 2018 12:40
That's a good option to save money yes. They often sell the blue ones
Mar 27, 2018 12:40
and they still have 3.7volts/20 amps
Mar 27, 2018 12:40
I am quite satisfied with the LGs I have, they've been unused for months
Mar 27, 2018 12:38
never trust batteries that claim to have more than 3500-4000 mAh
Mar 27, 2018 12:37
Usually I watch for price and mAh
Mar 27, 2018 12:37
It is very hard to determine which battery is fake through ebay though
Mar 27, 2018 12:34
@Dampmaskin That would explain why battery packs are so expensive. 14 of those batteries already cost 105$
Mar 27, 2018 12:34
I think those exact batteries are very good for this (Yes, electric bicycle), if something drains 3 amps for an hour, one battery can last for around 6 hours. If it is 14 of them, I can afford 42 amps for 6 hours at 3.7V
Mar 27, 2018 12:34
Those batteries are LG HG2 li-ions. Very expensive
Mar 27, 2018 12:34
So I need 14 batteries. That will make 1000W and 48V and 3000mAh. Seems like I will dry them very easily
 
Jun 23, 2017 22:51
@MichelKeijzers Yes, this is why I initially suggested it. Anyway what you plan to accomplish is very useful and I don't see why you wouldn't have success in mass-selling it too if you desire to.
Jun 23, 2017 22:51
A device that can send MIDI devices? Hm. About the program, it's generally used to translate midi messages, I find it for very well-written. It has clear interface that hides a lot of advanced functionality.
Jun 23, 2017 22:51
@MichelKeijzers Bome MIDI translator PRO. It of course requires writing driver. Also I hear you don't want laptop on-stage, but such software code can be embedded into your own computerized device, with a few (or a lot) modifications nonetheless.
Jun 23, 2017 22:51
@MichelKeijzers Midi message changer? That would be.. remaping MIDI messages? It is useful, there is one very good, though paid software (It was actually hard to find it) that does that. (p.s Synthesizers are more complicated then plain midi keyboards afaik)
Jun 23, 2017 22:51
@MichelKeijzers I agree.. and there is a potent relation between programming and electrical engineering. Are you experimenting with real midi devices? You can get rubbish midi devices and get parts from them. Then use a digital programmer and machine code to reprogram them.
Jun 23, 2017 22:51
@MichelKeijzers I play on midi keyboard :d I am really looking forward in the implementation of your project(s) too!
Jun 23, 2017 22:51
@CodeGorilla there is no computer near the place I intend to mount the alarm (I called the project "AllArm" it's catchy), also I plan to make it electricity-independent (Well more like house electrification-independent). The screen I need for varying diverse configuration of the behavior and yes, you are right - eventually for showing pictures as well. I will be auto-calling police after all, they must know who are they looking for.
Jun 23, 2017 22:51
@MichelKeijzers Thank you Michel. I am not a give-upper, I know there is a solution for everything. My programming experience has proven it.
Jun 23, 2017 22:51
@MichelKeijzers We have very limited resources unfortunately. And we only need to protect a room.. it's a small apartment.
Jun 23, 2017 22:51
@CodeGorilla What if I buy second arduino, optimized for the screen only and connect it to the main arduino creating I2C bus. I also bought motion sensor as a condition to activate the camera, I bought 4 li-ion lg batteries for independent power supply.
 

 The 2nd Monitor

General discussion about codereview.stackexchange.com - Welcom...
Mar 27, 2015 18:04
It will be suspicious if it was white huh
Mar 27, 2015 18:04
why is this black xDDDDDDDDd
Mar 27, 2015 17:57
this is easy