These are chat archives for SmingHub/Sming

16th
Feb 2016
alainmaes
@alainmaes
Feb 16 2016 01:38
@raburton When using rboot 2 sectors are used for the config. But if you have 2 roms and 2 spiffs areas, these 2 sectors (in the second rom area) are kept unused too right? I am looking for some space to store persistent data across OTA upgrades and am hoping that I can recycle some unused sectors for that. Could you please help me out?
alon24
@alon24
Feb 16 2016 07:11
pwm works for my car
I do not know if this is used now, i just remember reading about it a long time ago
zhivko
@zhivko
Feb 16 2016 07:36
@alon24 make lawn mover - I will buy it :)
alon24
@alon24
Feb 16 2016 07:38
it handles very nice now, with the joystick
Alexander V. Ribchansky
@avr39-ripe
Feb 16 2016 07:40
@alon24 your car looks really nice!! Will you share code and schematic? And what is the joystik app on the phone?
alon24
@alon24
Feb 16 2016 07:40
its all shared in the youtube link
and I created the app (shared too), modified the joysick from an open source (need to give them credit)
so all shared
Alexander V. Ribchansky
@avr39-ripe
Feb 16 2016 07:41
@alon24 ok, thanks! look on video here, and dont see any links.. will find them on youtube.. thanks!!!
alonewolfx2
@alonewolfx2
Feb 16 2016 08:36
@alon24 good work :)
robotiko
@robotiko
Feb 16 2016 11:58
@sle118 Gdb worked for you?
alon24
@alon24
Feb 16 2016 12:01
This message was deleted
Ivan Miskovic
@ivmi
Feb 16 2016 12:38
@alon24 Good work. I also created a small rc bot app. You can have a look at https://github.com/ivmi/Sming-rc . The UI is implemented using HTML canvas, so no android app is needed (your ui looks far nicer, though). Works on Android and IOS. You can check basic UI functionality on http://ivmi.github.io/
alon24
@alon24
Feb 16 2016 12:48
@ivmi cool, did u also add pwm?
Ivan Miskovic
@ivmi
Feb 16 2016 12:50
@alon24 no, I used one servo for direction, and another for movement (converted to continuous rotation). I will take a video later and post it.
alon24
@alon24
Feb 16 2016 12:51
gr8, you use servo and not simple dc mototrs?
Ivan Miskovic
@ivmi
Feb 16 2016 12:51
yes, it does have "analog" control
hreintke
@hreintke
Feb 16 2016 13:29
@ivmi @alon24 :
I am on the same activity as you are. Not that far but first signs of something working are showing.
As @ivmi : I am using continuous servo for movement.
@alon24 : Are you sending "text commands" from your android app to esp ?
If so, are these somehow configurable or hardcoded in the android/esp application.
alon24
@alon24
Feb 16 2016 13:41
Yes, hardcoded
U need esp to recognize what to do, I have 2 modes for control, 9axis and joystick
Ivan Miskovic
@ivmi
Feb 16 2016 13:50
@hreintke There is a small bug in servo library, you can't drive more than 1 servo. I made a PR.
alon24
@alon24
Feb 16 2016 13:59
@hreintke what r u trying to do, how would configuring the commands dynamically help on esp. if it needs to act on it in certain ways
hreintke
@hreintke
Feb 16 2016 14:04

@ivmi : Just merged your fix.
FYI : I asked @johndoe8967 to check the servo library.

  • It is using a lot of global variables which should be moved to class variables.
  • Renaming Servo->SevoControl, ServoChannel -> Servo
  • Add arduino compatible methods
  • Only one channel simultaneous (fixed by you).

If you have other/ideas on the servo libs, please tell so we can improve

crosofg
@crosofg
Feb 16 2016 14:05
how do I falsh my ESP from an Online IDE Cloud9 VM? How to use USB Port ?
hreintke
@hreintke
Feb 16 2016 14:09
@alon24 : I was asking about the android app. I suppose that sends commands to the esp.
Are those commands specific for your car application (then I would need to change the android app for my purpose) or are they generic from the android app and you "translate" them in the esp (then I can do my own in the esp app).
Ivan Miskovic
@ivmi
Feb 16 2016 14:10
@hreintke I would prefer a basic servo class without any scaling (only writeMicroseconds). Then it could be inherited by another class, for scaling etc. I'll see if I can do something.
alon24
@alon24
Feb 16 2016 14:12
@hreintke specific - unless u 2 thought it was a good idea tosend "Move xyJoystick" and "Move xy" :)
the esp listens to commands, its pretty streight forward
Ivan Miskovic
@ivmi
Feb 16 2016 14:16
@hreintke You might take a look at the native html approach. It's not hard to change layout to add additional controls. Have a look at web/dev/gamepad.js in my repo.
robotiko
@robotiko
Feb 16 2016 14:27
or
@hreintke you might like http://www.blynk.cc
esp8266 is supported
gneric android app for iot
nice stuff
hreintke
@hreintke
Feb 16 2016 14:28
@alon24 :
Well, it's a design decision. If the adroid app is just sending generic commands, I can have a "translate class" in the esp which takes care of making car commands from generic. All car application is then on one spot.
And I can reuse the app for different apps without change.
alon24
@alon24
Feb 16 2016 14:42
if u define something i will implement
hreintke
@hreintke
Feb 16 2016 14:42

@robotiko :
Blynck could be, nice architecture. But it's really arduino so would need some conversion.

void setup()
{
  Serial.begin(9600); // See the connection status in Serial Monitor
  Blynk.begin(auth);  // Here your Arduino connects to the Blynk Cloud.
}

void loop()
{
  Blynk.run(); // All the Blynk Magic happens here...
}

:smile:

alon24
@alon24
Feb 16 2016 14:43
lets call it the alonhr protocol!
hreintke
@hreintke
Feb 16 2016 15:39
@alon24 :
Will do some thinking on what/how and report back.
sle118
@sle118
Feb 16 2016 16:04
@slaff I have added documentation to SmingHub/Sming#350
Harry Böttcher
@harry-boe
Feb 16 2016 16:12

@hreintke > @/all :
I am experimenting with interrupts (on GPIO).
Tried the basic_interrupts but without luck.
Does anyone have a working example ?

Checkout the PR #561 Gesture sensor
It uses a GPIO Interrupt trigered by the sensor the fetch the data. All working ;)

hreintke
@hreintke
Feb 16 2016 16:31
@harry-boe :
Had the same issue yesterday when I was testing the Interrupt conversion from NONOS to RTOS.
However in #584 @crosofg implemented similar functionality like you which is working.
Did not do further investigate the issue with basic_interrupt.
Harry Böttcher
@harry-boe
Feb 16 2016 16:32
@hreintke sometimes life is hard.
I have a simmilar issue with some HW SPI stuff that i cant figure out what’s going on ..
hreintke
@hreintke
Feb 16 2016 16:48
Well, I found the issue in the RTOS version (not using example but my local test application), so I have interrupts working there.
Did not yet took the action on taking the basic_interrupts example and actually find why that doesn't work.
ghosts?
alon24
@alon24
Feb 16 2016 16:55
@hreintke is interrupt working in rtos now or not?
I mean when I tested infoscreens it did
hreintke
@hreintke
Feb 16 2016 17:06
@alon24 :
Yes interrupts is working in RTOS. But I fixed an issue yesterday.
How did/do you use interrupts in infoscreens ?
alon24
@alon24
Feb 16 2016 17:11
For rotary encoder
hreintke
@hreintke
Feb 16 2016 17:13
Is that part in your infoscreens repo ?
alon24
@alon24
Feb 16 2016 17:19
Yes, rtos branch
alonewolfx2
@alonewolfx2
Feb 16 2016 18:02
@hreintke i Will look into blynk
seems very nice
Blynk
Is it service or library?
hreintke
@hreintke
Feb 16 2016 19:17
@alon24 :
When testing interrupts with my application on RTOS I had to update Sming.
During conversion a difference of SDK usage was introduced which prevented correct attachment of interrupts.
I do see that in your infoscreens library you also have the attachinterrupt.
Could you do a quick test whether the update has effect on your infoscreen ?
alon24
@alon24
Feb 16 2016 19:21
Tommorow I hope
alonewolfx2
@alonewolfx2
Feb 16 2016 20:29
ok. blynk is library.
lets start to port again
slaff
@slaff
Feb 16 2016 22:03
Someone with Windows or Mac OS willing to test compiling something for me?
robotiko
@robotiko
Feb 16 2016 22:05
i'M IN
:)
pr 350?
Harry Böttcher
@harry-boe
Feb 16 2016 22:46
Hardware SPI -> this is going to kill me!!
I found this in the esp8266 Arduino SPI implementation:
They reduce bigger SPI Blocks to 64 Byte junk's. If i'm doing that i get completely different data back: Anyone knows what's going on here ?
/**
 * Note:
 *  in and out need to be aligned to 2Bit
 *  or you get an Fatal exception (9)
 * @param out uint8_t *
 * @param in  uint8_t *
 * @param size uint32_t
 */
void SPIClass::transferBytes(uint8_t * out, uint8_t * in, uint32_t size) {
    while(size) {
        if(size > 64) {
            transferBytes_(out, in, 64);
            size -= 64;
            if(out) out += 64;
            if(in) in += 64;
        } else {
            transferBytes_(out, in, size);
            size = 0;
        }
    }
}