Thanks #teastain that works!
I simply changed ADXL345 accel(ADXL345_STD) to ADXL345 accel(ADXL345_ALT) in example code ReadXYZ.ino.
Thanks again.
Thanks #teastain that works!
I simply changed ADXL345 accel(ADXL345_STD) to ADXL345 accel(ADXL345_ALT) in example code ReadXYZ.ino.
Thanks again.
Does anyone have a working example for the SERVO Module Board 12 Channels? I'm using the code below with single servo on port 1 and all I get when I run this code is "Servo Example" written across the M5Core screen but no movement whatsoever from the servo. Note the ports on the module are 0 thru 11 and my servo is plugged into 1 because the pins on port zero are too close to the module case to get my servo plug in anywhere on that row.
Also, for the to Servo_write_angle(uint8_t number, uint16_t us) and Servo_write_us(uint8_t number, uint16_t us) is number the port number (0..11)?
Thanks in advance.
#include <Arduino.h>
#include <M5Stack.h>
#include <Wire.h>
#define SERVO_ADDR 0x53
void setup() {
M5.begin(true, false, true);
M5.Power.begin();
M5.Lcd.setTextFont(4);
M5.Lcd.setCursor(70, 100);
M5.Lcd.print("Servo Example");
Wire.begin(21, 22, 100000UL);
}
// addr 0x01 mean control the number 1 servo by us
void Servo_write_us(uint8_t number, uint16_t us) {
Wire.beginTransmission(SERVO_ADDR);
Wire.write(0x00 | number);
Wire.write(us & 0x00ff);
Wire.write(us >> 8 & 0x00ff);
Wire.endTransmission();
}
// addr 0x11 mean control the number 1 servo by angle
void Servo_write_angle(uint8_t number, uint8_t angle) {
Wire.beginTransmission(SERVO_ADDR);
Wire.write(0x10 | number);
Wire.write(angle);
Wire.endTransmission();
}
void loop() {
for (uint8_t i = 0; i < 12; i++) {
//Servo_write_us(i, 700);
Servo_write_angle(i, 0);
}
delay(1000);
for (uint8_t i = 0; i < 12; i++) {
//Servo_write_us(i, 2300);
Servo_write_angle(i, 90);
}
delay(1000);
}
Does anyone have an example using low level neopixel functions. I've tried this with the HEX RGB Board with no luck:
import esp
I'm not sure what goes in grb_buy I took a guess.
grb_buf = [0] = 0
grb_buf = [1] = 255
grb_buf = [2] = 0
esp.neopixel_write(26, grb_buf, is80khz)
I wanted to try this CircuitPython https://circuitpython.org/board/m5stack_atom_lite/
or
v1.9.1 from here https://micropython.org/download/M5STACK_ATOM/
Thanks for responding.
Does the Atom Lite come with the latest firmware installed or is there a newer version than Micropython-1.12? I found some firmware on the MicroPython site but when I load it everything appears to go as expected but then I can't reach my Atom Lite via VSCode afterwards. I can put everything back using M5Burner but wanted the newer firmware. Has anyone else trien to update the firmware and if so where did you find it and what version did you use? Thanks in advance.
Here are the results of my attemp showing no errors:
python -m esptool --chip esp32 --port COM11 write_flash -z 0x1000 M5STACK_ATOM-20220618-v1.19.1.bin
esptool.py v3.2
Serial port COM11
Connecting....
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 4c:75:25:d7:8e:90
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x0017cfff...
Compressed 1554752 bytes to 1026054...
Wrote 1554752 bytes (1026054 compressed) at 0x00001000 in 93.4 seconds (effective 133.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Ok, I got the HEX RGB LED to work with the Atom Lite. Using the code below everything works as expected but there is an occasional stray LED lighting up in a completely different color. Does anyone know what might be causing that?
from neopixel import NeoPixel
from machine import Pin
from time import sleep
np = NeoPixel(Pin(26), 37)
n = 0
while True:
np[n] = (0, 0, 0)
if n < 36:
n += 1
else:
n = 0
np[n] = (10, 0, 0)
np.write()
sleep(0.2)
Does anyone know where I can find an example using the Atom Lite with the HEX?
https://docs.m5stack.com/en/unit/hex
Thanks in advance,
WW
I noticed when searching Google most Dupont cables are 2.54mm is this the best size for a snug connection on the various M5Stack controllers?
Thanks #teastain that works!
I simply changed ADXL345 accel(ADXL345_STD) to ADXL345 accel(ADXL345_ALT) in example code ReadXYZ.ino.
Thanks again.
Thanks ajb2k3. I have established that I have an I2C device at address 0x53. The device is a Seeed Studio101020054 Grove - 3-Axis Digital Accelerometer. Now how do I read a value from that address?
Thanks again.