Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop ( ) {
- int noBytes = Udp.parsePacket();
- String received_command = " ";
- if ( noBytes ) {
- Udp.read(packetBuffer,noBytes);
- for (int i=1;i<=noBytes;i++){
- received_command += char(packetBuffer[i - 1];
- }
- int dac_value;
- dac_value = received_command.toInt(); // str to int
- Serial.print("adc value: ");
- Serial.println(dac_value);
- //## how to send dac_value to mcp4725 for take analog out this section !?!? ##
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement