Compare commits
No commits in common. "ee4b4d20814e4ee2e364cb96a41101658f4901c8" and "c911da4dc0d0030a29ab2211177f600c80aa4244" have entirely different histories.
ee4b4d2081
...
c911da4dc0
@ -27,7 +27,7 @@ read_all_leds()
|
|||||||
let zhao_server_errors = 0
|
let zhao_server_errors = 0
|
||||||
|
|
||||||
const job = new CronJob(
|
const job = new CronJob(
|
||||||
'*/1 * * * * *',
|
'*/5 * * * * *',
|
||||||
async () => {
|
async () => {
|
||||||
// 测试 http://zhao 的连通性
|
// 测试 http://zhao 的连通性
|
||||||
request('http://zhao', (err, res, body) => {
|
request('http://zhao', (err, res, body) => {
|
||||||
@ -42,10 +42,8 @@ const job = new CronJob(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let color = sense.getPixel(0, 0)
|
let color = sense.getPixel(0, 0)
|
||||||
let r = color[0]
|
color[2] = (color[2] + 50) % 255
|
||||||
let g = color[1]
|
sense.setPixel(0, 0, color)
|
||||||
let b = color[2]
|
|
||||||
sense.setPixel(0, 0, [r, g > 0 ? 0 : 255, b])
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user