• Programming - WAYWO - V.37
    1,000 replies, posted
[QUOTE=Map in a box;40191864]Parse [code] function helloWorld() { return console.log(console.log(3+4)-2+","+console.log.log('hi')); } [/code][/QUOTE] [URL]https://gist.github.com/Vbitz/5329682[/URL] And I just noticed that accessing console gobbled up the rest of the line [code] var first = true; var astRes = astFile("access", tokens, currentPos, function (type) {if (first){first = false}else{return true}}); [/code] A really easy fix
[QUOTE=ChristopherB;40185967]I can't remember what you are using for an OBC, but you might consider using [URL="http://store.diydrones.com/DroneCell_p/br-dronecell-01.htm"]DroneCell[/URL]. You could program your drone to accept commands/transmit telemetry via text messages.[/QUOTE] Thanks, but I also need GPS. :( [QUOTE=redx475;40186963]I suggest looking up a cheap and small android phone on ebay or something. I have an old Motorola charm and it is light, small, and most importantly it runs android. It doesn't sound like you will need much processing power, so maybe try to find something like that.[/QUOTE] This might work pretty well. The lightest phone I found is 50g lighter than my SGSII and only costs 80€ new. But what I did for now was change how I put the phone on the drone. This was my first version: [t]http://puu.sh/2vv2r[/t] This is what I tried now: [t]http://puu.sh/2vv7v[/t] This saves me 92g and was much, much easier to do. This proves that KISS also applies to IRL things, not just code. With this new contraption I managed to fly a few rounds in the fields in front of my house. At first I used my tablet to control the drone, but obviously I had to get out of Wifi range as soon as my drone started misbehaving and I couldn't send the land command anymore. It crashed right into our garden fence. Then I just borrowed my father's Android and port forwarded the port I was running the web control interface on. That way I could go to a bigger field and didn't have to worry about Wifi and the latency was very reasonable considering I was sending a request over 3G to my home and then sending it back over 3G to my phone and then sending it over Wifi to the drone. The next problem was that with the additional payload the drone was turning very, very slowly. In my last video I was just flying forward all the time and turned in the direction of my target at the same time. This wasn't a problem because it turned really fast but now it turned too slow and I couldn't land it in time and it crashed into my neighbors garden fence :v: I'll fix that now and try to film it flying around soon. I almost have a bad conscience because I'm always posting these walls of text and haven't posted a single screenshot or video in weeks. Sorry :( [B]Edit:[/B] Here, have a screenshot of the control interface: [t]http://puu.sh/2vvsp[/t] The black circle is the drone and the red marker is the target. The buttons should be self-explanatory.
[QUOTE=Frugle;40185269]Working on a bandwidth monitor for personal use. [img]http://i.imgur.com/KPVdUlP.png[/img][/QUOTE] Make a program that downloads data from the internet at a controlled rate use it to draw a dick on the graph
[QUOTE=Robber;40192315]Thanks, but I also need GPS. :( This might work pretty well. The lightest phone I found is 50g lighter than my SGSII and only costs 80€ new. But what I did for now was change how I put the phone on the drone. This was my first version: [t]http://puu.sh/2vv2r[/t] This is what I tried now: [t]http://puu.sh/2vv7v[/t] This saves me 92g and was much, much easier to do. This proves that KISS also applies to IRL things, not just code. With this new contraption I managed to fly a few rounds in the fields in front of my house. At first I used my tablet to control the drone, but obviously I had to get out of Wifi range as soon as my drone started misbehaving and I couldn't send the land command anymore. It crashed right into our garden fence. Then I just borrowed my father's Android and port forwarded the port I was running the web control interface on. That way I could go to a bigger field and didn't have to worry about Wifi and the latency was very reasonable considering I was sending a request over 3G to my home and then sending it back over 3G to my phone and then sending it over Wifi to the drone. The next problem was that with the additional payload the drone was turning very, very slowly. In my last video I was just flying forward all the time and turned in the direction of my target at the same time. This wasn't a problem because it turned really fast but now it turned too slow and I couldn't land it in time and it crashed into my neighbors garden fence :v: I'll fix that now and try to film it flying around soon. I almost have a bad conscience because I'm always posting these walls of text and haven't posted a single screenshot or video in weeks. Sorry :( [B]Edit:[/B] Here, have a screenshot of the control interface: [t]http://puu.sh/2vvsp[/t] The black circle is the drone and the red marker is the target. The buttons should be self-explanatory.[/QUOTE] You should release this.
[QUOTE=SEKCobra;40192525]You should release this.[/QUOTE] "Fly free little drone!"
[QUOTE=Lexic;40192680]"Fly free little drone!"[/QUOTE] "Take a flight to England and deliver some tea to resolve the tea crysis!"
Lord knows they need more tea after that tea party we had last night.
[QUOTE=Map in a box;40192699]Lord knows they need more tea after that tea party we had last night.[/QUOTE] I cried when I woke up to find I had no tea left.
So I installed SFML for C++, where do I start? What do I make?
[QUOTE=Two-Bit;40193247]So I installed SFML for C++, where do I start? What do I make?[/QUOTE] Draw a spinning triangle.
[QUOTE=SEKCobra;40192525]You should release this.[/QUOTE] I can't. Everything is hardcoded: the altitude, the start location, the domain to connect to. And I'm not even sure if the server would run outside Eclipse. Also the interface on the phone is a mess. You can't even tell if it's connected/connecting/etc. (don't judge me, I have to code clean-code at work, I like to just do it like however I want at home) I guess I could open source it if someone wants to play around with it. Would anyone be interested?
[QUOTE=Robber;40193329]I can't. Everything is hardcoded: the altitude, the start location, the domain to connect to. And I'm not even sure if the server would run outside Eclipse. Also the interface on the phone is a mess. You can't even tell if it's connected/connecting/etc. (don't judge me, I have to code clean-code at work, I like to just do it like however I want at home) I guess I could open source it if someone wants to play around with it. Would anyone be interested?[/QUOTE] So wait, if you try to start it from somewhere half way around the world, it would fly right back to your house?
[QUOTE=Two-Bit;40193247]So I installed SFML for C++, where do I start? What do I make?[/QUOTE] Pong
[QUOTE=NightmareX91;40193550]So wait, if you try to start it from somewhere half way around the world, it would fly right back to your house?[/QUOTE] Just like Paul Revere :heart:
Wrote a markov chain based name generator thingy First thing ever it shits out is "godwin"
[img]http://i.imgur.com/67P36PT.jpg[/img] So, I wrote my own sine function that works with integers. The inputs and outputs just are multiplied by 10^3, but it allows for way faster calculations on microcontrollers which don't have a floating point unit. (or: this is faster than floats in software) [editline]7th April 2013[/editline] Also the code if anyone is interested: [url]http://pastebin.com/Fnqq9Zai[/url] (So far it only works for the first quadrant, I'm still working on that) [editline]7th April 2013[/editline] There we go, it works in all 4 quadrants now! [url]http://pastebin.com/aEu1eqHq[/url]
[QUOTE=NightmareX91;40193550]So wait, if you try to start it from somewhere half way around the world, it would fly right back to your house?[/QUOTE] No, but you'd have to manually scroll Google Maps halfway around the world and the preset targets would be all wrong and I'd probably have to reconfigure my dyndns to point to a different server.
[QUOTE=Robber;40194839]No, but you'd have to manually scroll Google Maps halfway around the world and the preset targets would be all wrong and I'd probably have to reconfigure my dyndns to point to a different server.[/QUOTE] Ah, okay.
[QUOTE=Two-Bit;40193247]So I installed SFML for C++, where do I start? What do I make?[/QUOTE] Asteroids is my go-to program for familiarising myself with a new library.
build an easy level chooser [thumb]http://i.imgur.com/sYDj9UK.png[/thumb]
What's up with the compass icons? Are they actually used for something?
[QUOTE=Gulen;40197035]What's up with the compass icons? Are they actually used for something?[/QUOTE] They're placeholder for real icons coming later. I used some of the android system drawables there
Ah, did you download the icon pack and import them from there, or is there a way to use them without packaging them with your app?
[QUOTE=Gulen;40197177]Ah, did you download the icon pack and import them from there, or is there a way to use them without packaging them with your app?[/QUOTE] If you have an up to date SDK, you can choose from a set of stock icons when you add a new resource.
[QUOTE=Gulen;40197177]Ah, did you download the icon pack and import them from there, or is there a way to use them without packaging them with your app?[/QUOTE] They are part of the android sdk and i think you can extract them (most of them should be in /android-sdk/platforms/android-[version]/data/res/ ). There is also the possibility to use the android 2.2 drawables from [url]http://androiddrawableexplorer.appspot.com/[/url] .
I've seen a lot of Apps on google.play that acts as a task manager, to force close Apps. I made one myself, but took it to the next level. I put it on a delayed timer! Shit just got real: [img]https://dl.dropbox.com/u/99717/CloseItIn%20list.png[/img][img]https://dl.dropbox.com/u/99717/CloseItIn%20New.png[/img] My first real App I made.
[QUOTE=Robber;40192315]Thanks, but I also need GPS. :([/QUOTE] Yeah, the DroneCell is just a communication module so you would need an On Board Computer and a GPS module.
So I was making Terraria in Python and I got the terrain generation working with the perlin noise and such, but it is way too slow so I'm recoding it for LOVE2D. :(
[QUOTE=Blasphemy;40201558]So I was making Terraria in Python and I got the terrain generation working with the perlin noise and such, but it is way too slow so I'm recoding it for LOVE2D. :([/QUOTE]Python is quite a fast language I thought? How slow are we talking about? Perlin noise can be slow you know.
[QUOTE=dije;40202884]Python is quite a fast language I thought? How slow are we talking about? Perlin noise can be slow you know.[/QUOTE] Python? Fast? Hah.
Sorry, you need to Log In to post a reply to this thread.