Click here to Skip to main content
15,797,801 members

Comments by ramen79 (Top 17 by date)

ramen79 3-Sep-19 6:34am View    
correct is>>

bus.write_i2c_block_data(i2c_address, i2c_cmd,byteDate)
ramen79 3-Sep-19 6:33am View    
Hi!
thanks.
meantime I have done it with "," separated string.

like:
byteData = ConvertStringToBytes("250,5000,400,1,430")
bus.write_i2c_block_data(byteDate)

thanks
ramen79 11-Mar-19 5:38am View    
Oops!
thanks. It is working now.
ramen79 24-Feb-19 15:33pm View    
Thanks Richard for your reply.
I have tried with ajax, it is polling latlon from mysql every 5 secs as i set(I have checked with alert), but no luck yet ,the map layer/marker position not getting updated..

Below is the code I have tried...

function fetchdata(){
$.ajax({
url: 'getLatLong.php',
type: 'post',
dataType: 'json',
success: function(response){
// Perform operation on the return value
// alert(response);
var latlon = response
//alert(latlon)
//setMap(latlon)
var myMap = setTimeout(setMap,3000)
function setMap(){
var map = new L.map('map' , {center: latlon,
zoom: 14})
// Creating a Layer object
var layer = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')
// Adding layer to the map
map.addLayer(layer)
var marker = L.marker(latlon).addTo(map)
layer.bindPopup('LatLng: ' + layer.getLatLng()).openPopup()
}

},
complete:function(data){
setTimeout(fetchdata,5000);
}
});
}


$(document).ready(function(){
setInterval(fetchdata,5000);
ramen79 28-Jan-18 9:14am View    
I have tried, it only sendsms to the 1st number.