This is an old post from Bunnie's blog, but makes a fascinating read. Welcome to the world of counterfeit electronic components! http://www.bunniestudios.com/blog/?p=918
Mobile Phone/Tablet charging Power Banks can be used to power so many DIY projects. But if your project is low power and draws very little current, the power bank will auto turn off after a few seconds thinking that it isn't being used to charge gadget (because the current draw is very low). I need to figure out a way to hack one and locate and replace the current sense resistor with one of a higher value. Here is how I did it. This told me that the resistor would be located on the return path (ground path) of the output USB connector. I promptly located the R100 SMD resistor in my iBall portable charger. The fact that this resistor was fatter (higher power dissipation rating) and that it was 0.1 ohms in value confirmed that this had to be the current sense resistor Original 0.1 ohms current sense resistor I measured the voltage across it when nothing was connected. It was zero volts and the portable charger turned off in a few seconds when nothing was being charg...
CH375B module. It is usually supplied with a 2 way jumper mounted on TXD and RXD pin. The TXD RXD pins are located next to the female USB receptacle. Please unmount the jumper before use. Get the following components: Arduino Nano Male to female jumper wires - 4 pieces USB Mouse CH375B module Download MeUsb.cpp and MeUsb.h from https://github.com/xeecos/Me-USB-Host On your Windows computer which already has arduino installed, go to your documents folder. There you will find a folder called arduino and within that another folder called libraries. Inside this libraries folder create a new folder called "MeUsb" Place MeUsb.cpp and MeUsb.h in this folder In the arduino\libraries folder, create another folder called "SoftwareSerial_fix" And in this folder download and place SoftwareSerial_fix.cpp and SoftwareSerial_fix.h from the same link as above. Assemble the circuit on the bread board as follows: +5V of Arduino Nano to ...
So here is a pair of programs demonstrating the use of sockets on Linux. The server program is run first. Then whenever the client program is run, it connects to the server on the specified port and they both exchange strings and terminate. TCP is used over IPv4. Simple_tcpserver_ipv4.c: # include < stdio.h > # include < stdlib.h > # include < unistd.h > # include < string.h > # include < sys/types.h > # include < sys/socket.h > # include < netinet/in.h > # include < netdb.h > # include < arpa/inet.h > void error ( char * msg ) { perror ( msg ) ; exit ( 1 ) ; } int main ( int argc , char * argv [ ] ) { int sockfd , newsockfd , portno ; socklen_t clilen ; char buffer [ 256 ] ; struct sockaddr_in serv_addr , cli_addr ; int n ; if ( argc < 2 ) { fprintf ( stderr , " Usage: %s \n " , argv [ 0 ] ) ; exit ( 0 ) ; } ...
Comments
Post a Comment